Skip to content

Commit

Permalink
fix: Modify css support check to work better with SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyeric committed May 5, 2019
1 parent 2fb71a1 commit 82a213d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/css-supports.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
export function cssSupports (property, value) {
if (CSS) {
if (typeof CSS !== 'undefined') {
return CSS.supports(property, value)
}

if (typeof document === 'undefined') {
return false;
}

return toCamelCase(property) in document.body.style
}

Expand Down

0 comments on commit 82a213d

Please sign in to comment.