Skip to content

Commit

Permalink
Support running in server environments (#208)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
MajorBreakfast and sindresorhus committed Jun 19, 2022
1 parent 826324d commit 2907f62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -48,6 +48,10 @@ const methodMap = [
];

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

const unprefixedMethods = methodMap[0];
const returnValue = {};

Expand Down

0 comments on commit 2907f62

Please sign in to comment.