diff --git a/packages/epo-react-lib/package.json b/packages/epo-react-lib/package.json index 9d2fb892..07350ea4 100644 --- a/packages/epo-react-lib/package.json +++ b/packages/epo-react-lib/package.json @@ -1,7 +1,7 @@ { "name": "@rubin-epo/epo-react-lib", "description": "Rubin Observatory Education & Public Outreach team React UI library.", - "version": "2.0.4", + "version": "2.0.5", "author": "Rubin EPO", "license": "MIT", "homepage": "https://lsst-epo.github.io/epo-react-lib", diff --git a/packages/epo-react-lib/src/lib/utils.ts b/packages/epo-react-lib/src/lib/utils.ts index 2cf30dae..eb42814f 100644 --- a/packages/epo-react-lib/src/lib/utils.ts +++ b/packages/epo-react-lib/src/lib/utils.ts @@ -73,11 +73,11 @@ export function isStyleSupported(prop: string, value: string): boolean { // If no value is supplied, use "inherit" value = arguments.length === 2 ? value : "inherit"; // Try the native standard method first - if ("CSS" in window && "supports" in window.CSS) { + if (window && "CSS" in window && "supports" in window.CSS) { return window.CSS.supports(prop, value); } // Check Opera's native method - if ("supportsCSS" in window) { + if (window && "supportsCSS" in window) { return (window.supportsCSS as (property: string, value: string) => boolean)( prop, value