fix: fix dispatching compat actions

This commit is contained in:
satyajit.happy
2019-09-16 15:21:07 +02:00
parent e0f28a432d
commit 88a560aacb

View File

@@ -27,9 +27,9 @@ export default function createCompatNavigationProp<
return {
...navigation,
...Object.entries(helpers).reduce<{ [key: string]: Function }>(
(acc, [name, method]) => {
(acc, [name, method]: [string, Function]) => {
if (name in navigation) {
acc[name] = method;
acc[name] = (...args: any[]) => navigation.dispatch(method(...args));
}
return acc;