[devdocsgjs/main: 621/1867] Don’t throw when the `CSS` global is not defined




commit 1bc20dbc0dd00c336cbbd39cd44414c20417041e
Author: Jed Fox <git twopointzero us>
Date:   Fri May 3 09:41:10 2019 -0400

    Don’t throw when the `CSS` global is not defined

 assets/javascripts/app/app.coffee | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/assets/javascripts/app/app.coffee b/assets/javascripts/app/app.coffee
index ab67a92a..b097ea36 100644
--- a/assets/javascripts/app/app.coffee
+++ b/assets/javascripts/app/app.coffee
@@ -252,7 +252,7 @@
         matchMedia:         !!window.matchMedia
         insertAdjacentHTML: !!document.body.insertAdjacentHTML
         defaultPrevented:     document.createEvent('CustomEvent').defaultPrevented is false
-        cssVariables:         CSS.supports and CSS.supports('(--t: 0)')
+        cssVariables:       !!CSS?.supports?('(--t: 0)')
 
       for key, value of features when not value
         Raven.captureMessage "unsupported/#{key}", level: 'info'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]