-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReferenceError: window is not defined (2.0.0) #81
Comments
Sigh. Thank you! |
@wubzz are there localization modules you commonly use? Like locale? Or would it be better to parse It make sense to default to |
@jsmreese I think just overall that relying on One issue with the current default-value implementation for browser based applications is that the lib will yield different results from the same input data depending on the visitors browser settings, since |
@wubzz thanks for the input. I had a reason for using the browser's locale a few weeks ago, something to do with the way I'll change the default to point to moment's locale and get a new version published shortly! |
https://github.com/jsmreese/moment-duration-format/releases/tag/2.0.1 Please let me know if you see any further issues in Node! |
As specified in the release notes the library now uses
userLocale
and it defaults to properties on thewindow
object. This naturally throws an error in Node environment:ReferenceError: window is not defined
While this (at least in my case) is not an issue as I can just submit it through the options object, I still think it should be made clear in usage examples that
userLocale
must be provided when using Node.The text was updated successfully, but these errors were encountered: