Skip to content

Commit

Permalink
Support running on server environments (sindresorhus#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorBreakfast authored Jun 18, 2022
1 parent 826324d commit 068b584
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const methodMap = [
];

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

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

Expand Down

0 comments on commit 068b584

Please # to comment.