Skip to content

Commit ef00764

Browse files
authored
Revert "pass props" (#1660)
1 parent baec3ac commit ef00764

File tree

1 file changed

+7
-23
lines changed

1 file changed

+7
-23
lines changed

src/Reducer.js

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -220,35 +220,19 @@ function inject(state, action, props, scenes) {
220220
case ActionConst.JUMP: {
221221
assert(state.tabs, `Parent=${state.key} is not tab bar, jump action is not valid`);
222222
ind = -1;
223-
224-
let passProps = false;
225-
226-
state.children.forEach((c, i) => {
227-
if (c.sceneKey === action.key) {
228-
ind = i;
229-
230-
const isPass = state.children.filter(s => s.passProps && s.name === c.sceneKey);
231-
232-
if (isPass.length) {
233-
passProps = true;
234-
}
235-
}
236-
});
237-
223+
state.children.forEach((c, i) => { if (c.sceneKey === action.key) { ind = i; } });
238224
assert(ind !== -1, `Cannot find route with key=${action.key} for parent=${state.key}`);
239225

240226
if (action.unmountScenes) {
241227
resetHistoryStack(state.children[ind]);
242228
}
243229

244-
if (passProps) {
245-
state.children[ind] = getInitialState(
246-
props,
247-
scenes,
248-
state.index,
249-
action,
250-
);
251-
}
230+
state.children[ind] = getInitialState(
231+
props,
232+
scenes,
233+
state.index,
234+
action,
235+
);
252236

253237
return { ...state, index: ind };
254238
}

0 commit comments

Comments
 (0)