Skip to content

Commit

Permalink
Fix "ReferenceError: self is not defined" (mapbox#4593)
Browse files Browse the repository at this point in the history
  • Loading branch information
NameFILIP authored Jan 29, 2020
1 parent 77cfc5c commit 85e8515
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util/browser/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
/* eslint-env browser */
import type {Window} from '../../types/window';

export default (self: Window);
const win: ?Window = typeof self !== 'undefined' ? self : undefined;

export default win;

0 comments on commit 85e8515

Please sign in to comment.