stable

Clone or download

Read-only

request #18005 Race condition in locale loading for Intl polyfills

How to test: - On IE11, the relative dates should display correctly (for example in an artifact follow-ups). Before this patch, the polyfill locale data could arrive and be executed before the polyfills themselves. In that case, the data would not be added and the code would throw an error like 'no locale data for "en"' because it could not fallback to english. With this patch, the locales are forced to load after the actual polyfills, which means they will be correctly added. Note: the intl-numberformat polyfill was not needed [0] and thus was removed. We do not use "formatToParts". [0] https://formatjs.io/docs/polyfills/intl-relativetimeformat/#requirements Change-Id: I23908ea43b1369b7ea689ca6a63128c5a6bf0168

Modified Files

Name
M src/themes/tlp/package-lock.json +0 −19 Go to diff View file
M src/themes/tlp/package.json +0 −1 Go to diff View file
M src/themes/tlp/src/js/custom-elements/relative-date/polyfills.ts +28 −49 Go to diff View file