From 390a148c6667b895fff2d977aa24580f5a139393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 14 Jul 2020 17:13:40 +0200 Subject: [PATCH] Detect type="module" --- lib/ical/helpers.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ical/helpers.js b/lib/ical/helpers.js index a8a5c60d..705ec68f 100644 --- a/lib/ical/helpers.js +++ b/lib/ical/helpers.js @@ -6,6 +6,10 @@ /* istanbul ignore next */ /* jshint ignore:start */ +if ('noModule' in HTMLScriptElement.prototype) { + window.ICAL = {}; +} + if (typeof module === 'object') { // CommonJS, where exports may be different each time. ICAL = module.exports;