mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Merge pull request #1518 from velesin/preload_store_context_refactoring
removes redundant context binding
This commit is contained in:
commit
c3c06ae8ea
1 changed files with 3 additions and 5 deletions
|
@ -31,11 +31,9 @@ PreloadStore = {
|
|||
@returns {Ember.Deferred} a promise that will eventually be the object we want.
|
||||
**/
|
||||
getAndRemove: function(key, finder) {
|
||||
var preloadStore = this;
|
||||
|
||||
if (preloadStore.data[key]) {
|
||||
var promise = Ember.RSVP.resolve(preloadStore.data[key]);
|
||||
delete preloadStore.data[key];
|
||||
if (this.data[key]) {
|
||||
var promise = Ember.RSVP.resolve(this.data[key]);
|
||||
delete this.data[key];
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue