Revisions: use `reject()`, not `fail()`, when rejecting a deferred.
See #24425. git-svn-id: http://core.svn.wordpress.org/trunk@24666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2610d9a821
commit
6af2febb37
|
@ -320,6 +320,7 @@ window.wp = window.wp || {};
|
||||||
|
|
||||||
revisions.model.FrameState = Backbone.Model.extend({
|
revisions.model.FrameState = Backbone.Model.extend({
|
||||||
defaults: {
|
defaults: {
|
||||||
|
loading: false,
|
||||||
compareTwoMode: false
|
compareTwoMode: false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -391,7 +392,7 @@ window.wp = window.wp || {};
|
||||||
|
|
||||||
// Check if we're actually changing the diff id.
|
// Check if we're actually changing the diff id.
|
||||||
if ( this._diffId === diffId )
|
if ( this._diffId === diffId )
|
||||||
return $.Deferred().fail().promise();
|
return $.Deferred().reject().promise();
|
||||||
|
|
||||||
this._diffId = diffId;
|
this._diffId = diffId;
|
||||||
this.trigger( 'update:revisions', from, to );
|
this.trigger( 'update:revisions', from, to );
|
||||||
|
@ -407,7 +408,7 @@ window.wp = window.wp || {};
|
||||||
return this._ensureDiff();
|
return this._ensureDiff();
|
||||||
} else {
|
} else {
|
||||||
this._debouncedEnsureDiff();
|
this._debouncedEnsureDiff();
|
||||||
return $.Deferred().fail().promise();
|
return $.Deferred().reject().promise();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue