diff --git a/src/index.ts b/src/index.ts index e1306be..53bb5b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,7 +8,9 @@ let supportsModalPseudo = false try { // This will error in older browsers supportsModalPseudo = document.body.matches(':modal') === false -} catch {} +} catch { + supportsModalPseudo = false +} export const baseSupport = typeof globalThis === 'object' &&