Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Commit

Permalink
Fix: Make sure document is defined (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
KnisterPeter authored and sapegin committed Feb 12, 2018
1 parent d89417a commit 5988e85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export function addClassesForAllSizes(
}

export function attachAllStyles() {
if (typeof document === 'undefined') {
return;
}

// Create <style> element
const element = document.createElement('style');
element.type = 'text/css';
Expand Down

0 comments on commit 5988e85

Please sign in to comment.