diff --git a/src/meteorSwitch.js b/src/meteorSwitch.js index 9cd5cfc..c583381 100644 --- a/src/meteorSwitch.js +++ b/src/meteorSwitch.js @@ -22,7 +22,7 @@ module.exports = (getMeteorData) => { const selected = navState.children.filter(el=>el.sceneKey==selectedKey) || console.error("key="+selectedKey+" doesn't exist"); const navigationState = selected[0] || console.error("Cannot find scene with key="+selectedKey); - if (navigationState.key != navState.children[navState.index].key){ + if (!navigationState || navigationState.key != navState.children[navState.index].key){ Actions[selectedKey](); }