Skip to content
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

Log an error if moment timezone was already loaded. #212 #219

Merged
merged 1 commit into from
May 13, 2015

Conversation

timrwood
Copy link
Member

This adds an error message when loading moment-timezone twice. This addresses #212.

http://jsfiddle.net/eLh5m79c/

image

@mattjohnsonpint
Copy link
Contributor

👍

mattjohnsonpint added a commit that referenced this pull request May 13, 2015
Log an error if moment timezone was already loaded. #212
@mattjohnsonpint mattjohnsonpint merged commit 3c82b06 into moment:develop May 13, 2015
@timrwood timrwood deleted the warn-when-loading-twice branch May 13, 2015 19:39
@jebeck
Copy link

jebeck commented Nov 24, 2015

Can someone clarify? I'm seeing this in the following situation. We have a (parent) application A. It has dependencies B and C, each of which has moment-timezone as a dependency. I'm getting this log message, and unsure whether I need to do anything about it. It looks like the code is preventing double-loading of the moment-timezone data, so I think everything is fine. If that's the case, shouldn't the error message be something more like "Moment Timezone [loaded version] was already loaded with data from [loaded version data]. Not loading [second version] with data [second version data]. Unless [first version] is not the version you wanted to be loaded, everything is fine."

Happy to issue a PR with this change (or similar) if I'm interpreting the situation correctly!

@sunnybayz
Copy link

Agree with @jebeck . Should we worry about this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants