NavigationExperimental: Handle generic back action from stack reducer

Reviewed By: hedgerwang

Differential Revision: D3036422

fb-gh-sync-id: 8cf454a76ddc14b5601e84dee1ae5aaf98060d5f
shipit-source-id: 8cf454a76ddc14b5601e84dee1ae5aaf98060d5f
This commit is contained in:
Eric Vicenti 2016-03-10 12:32:19 -08:00 committed by Facebook Github Bot 5
parent a611ec5f23
commit b1090bfae1

View File

@ -74,6 +74,7 @@ function NavigationStackReducer({initialState, getReducerForState, getPushedRedu
return lastState; return lastState;
} }
switch (action.type) { switch (action.type) {
case 'back':
case 'BackAction': case 'BackAction':
if (lastParentState.index === 0 || lastParentState.children.length === 1) { if (lastParentState.index === 0 || lastParentState.children.length === 1) {
return lastParentState; return lastParentState;