Skip to content

Commit

Permalink
Document is not defined (#15)
Browse files Browse the repository at this point in the history
* fix for document is not defined

possibke solution for #14

* bump version to 2.1.2
  • Loading branch information
donavon committed Feb 9, 2019
1 parent f0739ea commit ad748d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "use-dark-mode",
"version": "2.1.1",
"version": "2.1.2",
"description": "A custom React Hook to help you implement a \"dark mode\" component.",
"main": "dist/use-dark-mode.js",
"umd:main": "dist/use-dark-mode.umd.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -12,7 +12,7 @@ const defaultClassNameLight = 'light-mode';
const defaultConfig = {
classNameDark: defaultClassNameDark,
classNameLight: defaultClassNameLight,
element: document.body,
element: global.document.body,
};
const mql = global.matchMedia
? global.matchMedia(preferDarkQuery)
Expand Down

0 comments on commit ad748d3

Please sign in to comment.