moment-timezone: moment.tz.guess() error
Running moment.tz.guess()
produces the following error:
Uncaught TypeError: Cannot read property 'join' of null(…)OffsetAt @ global.js:11363
userOffsets @ global.js:11408
rebuildGuess @ global.js:11475
guess @ global.js:11496
(anonymous function) @ VM762:2
InjectedScript._evaluateOn @ VM757:875
InjectedScript._evaluateAndWrap @ VM757:808
InjectedScript.evaluate @ VM757:664
OS: Windows 7, Build 7601 Browser: Chrome 47.0.2526.111 m Expected timezone: Asia/Tokyo
Opening the tests page on the momentjs website with the same environment produces no errors. However, in my code and as well as in the console in the momentjs site, running moment.tz.guess()
results in the same error.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (7 by maintainers)
Commits related to this issue
- Fix catch timezone bug see https://github.com/moment/moment-timezone/issues/294 — committed to freeCodeCamp/freeCodeCamp by deleted user 8 years ago
- Handle uncommon output from Date#toTimeString. Addresses #294 — committed to timrwood/moment-timezone by timrwood 8 years ago
This is released in
0.5.1
.Why not keep this issue open until that PR is merged? Otherwise people subscribed to this issue won’t know when the bug if fixed.
Sorry for the delay.
.guess()
is a brand new API, and moment-timezone is still on 0.x. Despite it being fairly complete, there are bound to be occasional bugs. I’ll look into this closer. Thanks.We have over a dozen users reporting this error. Is there a timeline for a fix on this?
ref https://github.com/freecodecamp/freecodecamp/issues/6633