forked from aksonov/react-native-router-flux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Util.js
39 lines (9 loc) · 848 Bytes
/
Util.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Object.defineProperty(exports,"__esModule",{value:true});exports.
deepestExplicitValueForKey=deepestExplicitValueForKey;exports.
assert=assert;function deepestExplicitValueForKey(navigationState,key){var current=void 0;var selected=navigationState;while({}.hasOwnProperty.call(selected,'children')){if(!selected.tabs){for(var i=0;i<selected.index;i+=1){if(typeof selected.children[i][key]!=='undefined'){current=selected.children[i][key];}}}selected=selected.children[selected.index];if(typeof selected[key]!=='undefined'){current=selected[key];}}if(typeof current==='undefined'){current=navigationState[key];}return current;}function assert(expr,failDescription){
if(!expr){
throw new Error('[react-native-router-flux] '+failDescription);
}
}
var OnEnter=exports.OnEnter='onEnter';
var OnExit=exports.OnExit='onExit';