File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ register([
6666] ) ;
6767
6868// 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 ;
7272}
7373
7474// plot icons
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ var intoStream = require('into-stream');
77var constants = require ( './constants' ) ;
88
99var 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);}' ;
1112
1213var moduleMarker = 'module.exports = ' ;
1314
You can’t perform that action at this time.
0 commit comments