Add ResizeObserver polyfill by juggle

Potential fix for older browsers
This commit is contained in:
schroda
2024-09-30 04:53:56 +02:00
parent 6ca16b9449
commit f7e5388e2a
4 changed files with 18 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import '@/polyfill.manual';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { App } from '@/App';

11
src/polyfill.manual.ts Normal file
View File

@@ -0,0 +1,11 @@
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { ResizeObserver as JuggleResizeObserver } from '@juggle/resize-observer';
window.ResizeObserver ??= JuggleResizeObserver;