Skip to content

Commit

Permalink
Check if window is available
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDaub committed Jul 23, 2020
1 parent 04236c7 commit fb1e238
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ical/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Portions Copyright (C) Philipp Kewisch, 2011-2015 */


if ('noModule' in HTMLScriptElement.prototype) {
// In case ical.js is executed in a JavaScript module, strict mode is enabled
// and requires a global variable to be assigned explicitly to e.g. the window
// object.
if (typeof window !== 'undefined' && 'noModule' in HTMLScriptElement.prototype) {
// In case ical.js is executed in the browser and a JavaScript module, strict
// mode is enabled and requires a global variable to be assigned explicitly
// to e.g. the window object.
window.ICAL = {};
}

Expand Down

0 comments on commit fb1e238

Please sign in to comment.