Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: Avoid hitting nonnull assertion for bestFormat
In a94a793 the desired behaviour when formatting Temporal objects was accidentally applied to formatting Date objects. So new Date().toLocaleDateString([], { hour: "numeric" }); would result in bestFormat being null, and according to the type assertion of the Intl.DateTimeFormat [[DateTimeFormat]] internal slot, that is not possible. Checking that _inherit_ = ~relevant~ here ensures the new behaviour is only applied to Temporal objects, and the type assertion is not hit. See: #3049
- Loading branch information