File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 81
81
}
82
82
83
83
$ ( document ) . ready ( function ( ) {
84
- // facade loads twice in the admin area , so all charts are also loaded twice
84
+ // facade loads twice in the library , so all charts are also loaded twice
85
85
// this will ensure that even if it loaded twice, it initializes all charts only once.
86
86
// fixed as part of the issue to add annotations.
87
- if ( localStorage . getItem ( 'viz-facade-loaded' ) === '1' ) {
88
- localStorage . removeItem ( 'viz-facade-loaded' ) ;
89
- return ;
87
+ if ( visualizer . page_type === 'library' ) {
88
+ if ( localStorage . getItem ( 'viz-facade-loaded' ) === '1' ) {
89
+ localStorage . removeItem ( 'viz-facade-loaded' ) ;
90
+ return ;
91
+ }
92
+ localStorage . setItem ( 'viz-facade-loaded' , '1' ) ;
90
93
}
91
- localStorage . setItem ( 'viz-facade-loaded' , '1' ) ;
92
94
$ ( 'body' ) . trigger ( 'visualizer:render:chart:start' , visualizer ) ;
93
95
initActionsButtons ( visualizer ) ;
94
96
registerDefaultActions ( ) ;
You can’t perform that action at this time.
0 commit comments