Skip to content

Commit

Permalink
Merge pull request #39 from highcharts/bugfix/dispatchevent-breaking-…
Browse files Browse the repository at this point in the history
…in-node

bugfix/no-window-object-in-newer-node
  • Loading branch information
bre1470 authored Aug 2, 2024
2 parents 358daad + 0dc7a43 commit 78544a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/templates/umd-standalone.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);

if (typeof CustomEvent === 'function') {
if (window && typeof CustomEvent === 'function') {
window.dispatchEvent(new CustomEvent(
@moduleEvent,
{ detail: { path: path, module: obj[path] } }
Expand Down

0 comments on commit 78544a3

Please sign in to comment.