Skip to content

Commit 2003d74

Browse files
Updated Origin.off to object-style syntax.
1 parent 960df62 commit 2003d74

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

frontend/src/modules/editor/global/editorDataLoader.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)