From 72b2e5364f69533bffa9c1364e7d9908e786922f Mon Sep 17 00:00:00 2001 From: Cristian Necula Date: Mon, 17 Jun 2019 12:01:36 +0300 Subject: [PATCH] (patch) cannot import as es6 module `this` is undefined when imported as es6 module Include detection from umd: https://github.com/umdjs/umd/blob/master/templates/amdWeb.js --- money.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/money.js b/money.js index 359df37..0ac6275 100644 --- a/money.js +++ b/money.js @@ -163,4 +163,4 @@ } // Root will be `window` in browser or `global` on the server: -}(this)); +}(typeof self !== 'undefined' ? self : this));