Skip to content

Commit

Permalink
fix(common/async_pipe): return immediately every value if it exist in…
Browse files Browse the repository at this point in the history
… subscriptions

Closes #187
  • Loading branch information
Hotell committed Dec 25, 2016
1 parent 5c6cb82 commit 189770e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/pipes/async_pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable';
import { Pipe } from '../../core/pipes/decorators';
import { PipeTransform } from '../../core/pipes/pipe_interfaces';

import { isObservable, isScope, isSubscription, isPromiseOrObservable } from '../../facade/lang';
import { isObservable, isScope, isSubscription, isPromiseOrObservable, isPresent } from '../../facade/lang';

type StoredSubscription = ng.IPromise<any>|ng.IHttpPromise<any>|Subscription;

Expand Down Expand Up @@ -92,7 +92,7 @@ export class AsyncPipe implements PipeTransform {

// return cached immediately
if ( inputId in AsyncPipe.subscriptions ) {
return AsyncPipe.values[ inputId ] || undefined;
return AsyncPipe.values[ inputId ];
}

const subscriptionStrategy = AsyncPipe._getSubscriptionStrategy( input );
Expand Down

0 comments on commit 189770e

Please sign in to comment.