refactor(PromisePipe): use lexical this inside of transform

This commit is contained in:
Jeff Cross 2015-05-12 10:43:56 -07:00
parent c8a0ed40bd
commit 96b0a1c75e
1 changed files with 2 additions and 3 deletions

View File

@ -53,12 +53,11 @@ export class PromisePipe extends Pipe {
}
transform(promise: Promise<any>): any {
var pipe = this;
if (isBlank(this._sourcePromise)) {
this._sourcePromise = promise;
promise.then((val) => {
if (pipe._sourcePromise === promise) {
pipe._updateLatestValue(val);
if (this._sourcePromise === promise) {
this._updateLatestValue(val);
}
});
return null;