You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using fromISO on an string with a timezone in square brackets, a parsing issue is revealed. Specifically, a JavaScript/TypeScript look-up object is used somewhere down the line which uses a regular Object, instead of one with a null-prototype. This means that default Object keys are considered valid, and hence, for example, constructor is (partially) considered a valid timezone:
Describe the bug
When using
fromISO
on an string with a timezone in square brackets, a parsing issue is revealed. Specifically, a JavaScript/TypeScript look-up object is used somewhere down the line which uses a regular Object, instead of one with a null-prototype. This means that default Object keys are considered valid, and hence, for example,constructor
is (partially) considered a valid timezone:(pseudocode of likely implementation)
Luckily, later logic seems to fail on these keys, so the only impact appears to be a somewhat confusing error message:
To Reproduce
Actual vs Expected behavior
The result's
invalid.explanation
shows:while we'd expect:
Desktop (please complete the following information):
constructor
;)Additional context
N/A
The text was updated successfully, but these errors were encountered: