File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ register([
66
66
] ) ;
67
67
68
68
// locales that are present in the window should be loaded
69
- if ( window . PlotlyLocales && Array . isArray ( window . PlotlyLocales ) ) {
70
- register ( window . PlotlyLocales ) ;
71
- delete window . PlotlyLocales ;
69
+ if ( window . PlotlyConfig && window . PlotlyConfig . locales ) {
70
+ register ( window . PlotlyConfig . locales ) ;
71
+ delete window . PlotlyConfig . locales ;
72
72
}
73
73
74
74
// plot icons
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ var intoStream = require('into-stream');
7
7
var constants = require ( './constants' ) ;
8
8
9
9
var prefix = 'var locale=' ;
10
- var suffix = ';if(typeof Plotly === \'undefined\') {window.PlotlyLocales = window.PlotlyLocales || []; window.PlotlyLocales.push(locale);} else {Plotly.register(locale);}' ;
10
+ var suffix = ';window.PlotlyConfig = window.PlotlyConfig || {};' ;
11
+ suffix += 'if(typeof Plotly === \'undefined\') {window.PlotlyConfig.locales = window.PlotlyConfig.locales || []; window.PlotlyConfig.locales.push(locale);} else {Plotly.register(locale);}' ;
11
12
12
13
var moduleMarker = 'module.exports = ' ;
13
14
You can’t perform that action at this time.
0 commit comments