Should dispatch NAVIGATE_FAILURE if action is not able to resolve
lingyan opened this issue · comments
lingyan commented
fluxible/packages/fluxible-router/src/lib/navigateAction.js
Lines 49 to 54 in 7ad54c8
There are two cases here:
action
is not specified (route.action
is empty): Fine to dispatchNAVIGATE_SUCCESS
action
is specified but unable to resolve into a function: SHOULD dispatchNAVIGATE_FAILURE
We should fix the second case to dispatch failure event. Dispatching success event masks the problem and makes debugging hard.
Seth Bertalotto commented
This was fixed in both fluxible-router 1.x. and 2.x major versions.
lingyan commented
Yeah! thanks @redonkulus 🥇