mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
removes redundant context binding
This commit is contained in:
parent
5d329cff3a
commit
107932576e
|
@ -31,11 +31,9 @@ PreloadStore = {
|
||||||
@returns {Ember.Deferred} a promise that will eventually be the object we want.
|
@returns {Ember.Deferred} a promise that will eventually be the object we want.
|
||||||
**/
|
**/
|
||||||
getAndRemove: function(key, finder) {
|
getAndRemove: function(key, finder) {
|
||||||
var preloadStore = this;
|
if (this.data[key]) {
|
||||||
|
var promise = Ember.RSVP.resolve(this.data[key]);
|
||||||
if (preloadStore.data[key]) {
|
delete this.data[key];
|
||||||
var promise = Ember.RSVP.resolve(preloadStore.data[key]);
|
|
||||||
delete preloadStore.data[key];
|
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user