fix: css typed object support check

This commit is contained in:
Ahmet Yesil 2022-03-16 10:47:59 +01:00 committed by Ahmet Yeşil
parent 1df3a564f2
commit d46b989444
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@lion/overlays': patch
---
Fix check for css typed object support

View file

@ -24,7 +24,7 @@ async function preloadPopper() {
const GLOBAL_OVERLAYS_CONTAINER_CLASS = 'global-overlays__overlay-container'; const GLOBAL_OVERLAYS_CONTAINER_CLASS = 'global-overlays__overlay-container';
const GLOBAL_OVERLAYS_CLASS = 'global-overlays__overlay'; const GLOBAL_OVERLAYS_CLASS = 'global-overlays__overlay';
// @ts-expect-error [external]: CSS not yet typed // @ts-expect-error [external]: CSS not yet typed
const supportsCSSTypedObject = window.CSS && CSS.number; const supportsCSSTypedObject = window.CSS?.number && document.body.attributeStyleMap?.set;
/** /**
* @desc OverlayController is the fundament for every single type of overlay. With the right * @desc OverlayController is the fundament for every single type of overlay. With the right