File tree Expand file tree Collapse file tree
frontend/src/modules/editor/global Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,16 +110,20 @@ define(function(require) {
110110 waitForLoad : function ( callback ) {
111111 var done = function ( ) {
112112 if ( preloader . hasLoadedData ( ) ) {
113- Origin . off ( 'editor:dataPreloaded' , done ) ;
114- Origin . off ( 'editor:dataLoaded' , done ) ;
115- Origin . off ( 'editor:failedToLoad' , removeEvents ) ;
113+ Origin . off ( {
114+ 'editor:dataPreloaded' : done ,
115+ 'editor:dataLoaded' : done ,
116+ 'editor:failedToLoad' : removeEvents
117+ } ) ;
116118 callback . apply ( this ) ;
117119 }
118120 } ;
119121 var removeEvents = function ( ) {
120- Origin . off ( 'editor:dataPreloaded' , done ) ;
121- Origin . off ( 'editor:dataLoaded' , done ) ;
122- Origin . off ( 'editor:failedToLoad' , removeEvents ) ;
122+ Origin . off ( {
123+ 'editor:dataPreloaded' : done ,
124+ 'editor:dataLoaded' : done ,
125+ 'editor:failedToLoad' : removeEvents
126+ } ) ;
123127 } ;
124128 // in case we've already loaded
125129 done ( ) ;
You can’t perform that action at this time.
0 commit comments