diff --git a/package.json b/package.json index 56b660c52..5e9667807 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-router-flux", - "version": "3.30.2", + "version": "3.30.3", "description": "React Native Router using Flux architecture", "repository": { "type": "git", diff --git a/src/Switch.js b/src/Switch.js index 48776ec3e..6e96eb892 100644 --- a/src/Switch.js +++ b/src/Switch.js @@ -9,7 +9,6 @@ export default function Switch(props) { if (!selector && !statem) console.error('Selector should be defined.'); let index = -1; if (!selector) { - assert(statem.isIn, 'Wrong statem passed'); // support Statem - Harel statecharts machine! navState.children.forEach((el, i) => { assert(el.default || el.state, @@ -17,8 +16,7 @@ export default function Switch(props) { if (el.default) { index = i; } else { - assert(el.state.id, 'State doesn\'t have id'); - if (statem.isIn(el.state.id)) { + if (el.state.active) { index = i; } }