Skip to content

Commit 2522fec

Browse files
author
Claudéric Demers
authored
Merge pull request #59 from binary1101/master
Server-side rendering bugfix: safeguard against `document` being undefined
2 parents 2e96f2b + 54929ab commit 2522fec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const events = {
1616
};
1717

1818
export const vendorPrefix = (function () {
19-
if (typeof window === 'undefined') return ''; // server environment
19+
if (typeof window === 'undefined' || typeof document === 'undefined') return ''; // server environment
2020
let styles = window.getComputedStyle(document.documentElement, '');
2121
let pre = (Array.prototype.slice
2222
.call(styles)

0 commit comments

Comments
 (0)