Add ResizeObserver polyfill for safari (#3142)

This commit is contained in:
WithoutPants
2022-11-17 13:50:41 +11:00
committed by GitHub
parent c1f271fc52
commit 4ff163d375
4 changed files with 13 additions and 2 deletions

View File

@@ -24,6 +24,11 @@ async function checkPolyfills() {
await import("@formatjs/intl-pluralrules/polyfill");
await import("@formatjs/intl-pluralrules/locale-data/en");
}
if (!("ResizeObserver" in window)) {
const ResizeObserver = await import("resize-observer-polyfill");
window.ResizeObserver = ResizeObserver.default;
}
}
export const initPolyfills = async () => {