Skip to content

Commit

Permalink
Merge pull request #92 from johnnyeric/fix_modify-css-check-for-ssr
Browse files Browse the repository at this point in the history
Modify css support check to work better with SSR
  • Loading branch information
kazzkiq authored May 5, 2019
2 parents 2fb71a1 + 82a213d commit 62a6f88
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 62a6f88

Please sign in to comment.