From 5acbcfcfc08ba03d7f3cebe82372ffb879ea07a0 Mon Sep 17 00:00:00 2001 From: Basit Ali Date: Fri, 25 Dec 2015 18:01:07 +0500 Subject: [PATCH 1/2] Fallback on navigator.props._parent when parentNavigator is not found. --- index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 555497ebf..04ee1c817 100644 --- a/index.js +++ b/index.js @@ -210,11 +210,17 @@ class ActionContainer { //console.log("NAV LATEST SCENE:"+routes[routes.length-1].getName()+" "+routes.length); while (routes.length <= number || routes[routes.length-1].getType() === 'switch'){ // try parent navigator if we cannot pop current one - if (navigator.parentNavigator){ + var parentNavigator = navigator.parentNavigator; + if ( ! parentNavigator) { + parentNavigator = this.navs[navigator.props._parent]; + } + + if (parentNavigator) { //console.log("pop to parent navigator"); - navigator = navigator.parentNavigator; + navigator = parentNavigator; routes = navigator.getCurrentRoutes(); - } else { + } + else { throw new Error("Cannot pop navigator with less than "+number+" screens"); } } From 419a9fa288b67b7aeded938994581a8c97b62a86 Mon Sep 17 00:00:00 2001 From: Basit Ali Date: Fri, 25 Dec 2015 18:21:57 +0500 Subject: [PATCH 2/2] Transparent ExNavigator by default. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 04ee1c817..d49a1157b 100644 --- a/index.js +++ b/index.js @@ -553,7 +553,7 @@ class Router extends React.Component { new ExRoute(route, this.schemas))} style={styles.transparent} - sceneStyle={{ paddingTop: 0 }} + sceneStyle={{ paddingTop: 0, backgroundColor: 'transparent' }} showNavigationBar={!this.props.hideNavBar} {...this.props}