redux-polyglot icon indicating copy to clipboard operation
redux-polyglot copied to clipboard

getLocale()/getPhrases() can return a falsy value.

Open guillaumearm opened this issue 9 years ago • 3 comments

for v1.0

need #16

this will stop the progression :

  • if getLocale() or getPhrases() return or resolve a falsy value, should return next(action)
  • add 'previousLocale' as second parameter of getLocale() to determine if the locale have been changed.

about this behavior :

  • need tests
  • need doc

guillaumearm avatar Oct 09 '16 10:10 guillaumearm

I think it should return next(action), not return action

JalilArfaoui avatar Oct 18 '16 21:10 JalilArfaoui

yes, you're right. i don't remember why I thought to do that when I wrote this issue :)

guillaumearm avatar Oct 18 '16 22:10 guillaumearm

I remember ! (for return action)

it's about SET_LANGUAGE action. we shouldn't propagate this action ( and only this action ) when return a falsy value.

but that's no longer news since #38. so don't worry about this ;-)

guillaumearm avatar Oct 20 '16 15:10 guillaumearm