Skip to content

Commit 377fce4

Browse files
authored
Merge pull request #1005 from j-f1/fix-css-supports-check
Don’t throw when the `CSS` global is not defined
2 parents def4b28 + 1bc20db commit 377fce4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/javascripts/app/app.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
matchMedia: !!window.matchMedia
255255
insertAdjacentHTML: !!document.body.insertAdjacentHTML
256256
defaultPrevented: document.createEvent('CustomEvent').defaultPrevented is false
257-
cssVariables: CSS.supports and CSS.supports('(--t: 0)')
257+
cssVariables: !!CSS?.supports?('(--t: 0)')
258258

259259
for key, value of features when not value
260260
Raven.captureMessage "unsupported/#{key}", level: 'info'

0 commit comments

Comments
 (0)