Skip to content

Commit ab8d688

Browse files
committed
do not add Plotly to window in case of AMD
1 parent 0c724cf commit ab8d688

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tasks/util/bundle_wrapper.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ function addWrapper(path){
7373
path,
7474
[
7575
'',
76-
'window.Plotly = Plotly;',
76+
'if (!(typeof define === "function" && define.amd)) {',
77+
' window.Plotly = Plotly;',
78+
'}',
7779
'return Plotly;',
7880
'}));',
7981
].join('\n'),

0 commit comments

Comments
 (0)