Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit 89fb96d

Browse files
committed
Use proper cache object reference and bump version
1 parent 25b5253 commit 89fb96d

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-navigation/core",
3-
"version": "3.0.0-alpha.10",
3+
"version": "3.0.0-alpha.12",
44
"description": "Core utilities for the react-navigation framework",
55
"main": "dist/index.js",
66
"files": [

src/getChildrenNavigationCache.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ export default function getChildrenNavigationCache(navigation) {
33
return {};
44
}
55

6-
let childrenNavigationCache = navigation._childrenNavigation
7-
? navigation._childrenNavigation
8-
: {};
6+
let childrenNavigationCache =
7+
navigation._childrenNavigation || (navigation._childrenNavigation = {});
98
let childKeys = navigation.state.routes.map(route => route.key);
109
Object.keys(childrenNavigationCache).forEach(cacheKey => {
1110
if (!childKeys.includes(cacheKey)) {
1211
delete childrenNavigationCache[cacheKey];
1312
}
1413
});
1514

16-
return childrenNavigationCache;
15+
return navigation._childrenNavigation;
1716
}

0 commit comments

Comments
 (0)