Closed stuartf closed 10 years ago
heya @stuartf. this is a good point. do you think this is fixable in a backwards-compatible way?
(also, i'm not using this library much these days, so probably can't make api decisions as well as you can. i've added you as a collaborator, so feel free to move things forward.)
@jed something like the attached PR would work for my use case, and it doesn't break the existing tests, I don't know how backward compatible it is for people who are already using the module.
well, i can't imagine relying on setting a null default but expecting a string for comparison is a common case, so i would feel okay merging this.
I'd like to be able to run without a default language set because when using this as an express middleware I want to have a different default language in different contexts so I need to know if there wasn't a best match.
I've accomplished this by setting locale.Locale.default to be
null
but the serialization turns that back into a string, so I have to do a string compare instead of just a truth check.