refactor(PromisePipe): use lexical this inside of transform
This commit is contained in:
parent
c8a0ed40bd
commit
96b0a1c75e
@ -53,12 +53,11 @@ export class PromisePipe extends Pipe {
|
|||||||
}
|
}
|
||||||
|
|
||||||
transform(promise: Promise<any>): any {
|
transform(promise: Promise<any>): any {
|
||||||
var pipe = this;
|
|
||||||
if (isBlank(this._sourcePromise)) {
|
if (isBlank(this._sourcePromise)) {
|
||||||
this._sourcePromise = promise;
|
this._sourcePromise = promise;
|
||||||
promise.then((val) => {
|
promise.then((val) => {
|
||||||
if (pipe._sourcePromise === promise) {
|
if (this._sourcePromise === promise) {
|
||||||
pipe._updateLatestValue(val);
|
this._updateLatestValue(val);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user