fix(core): ensure initial value of QueryList length (#21980) (#21982)

Set initial value of `length` to `0`.

Fixes regression introduced by e544742156 (diff-a85dbe0991a7577ea24b49374e9ae90b) where the `length` property ceased to have initial value.

Closes #21980

PR Close #21982
This commit is contained in:
Emilio
2018-02-01 22:26:27 -08:00
committed by Miško Hevery
parent 07769e5caa
commit 47b73fd153
2 changed files with 17 additions and 1 deletions

View File

@ -41,7 +41,7 @@ export class QueryList<T>/* implements Iterable<T> */ {
private _results: Array<T> = [];
public readonly changes: Observable<any> = new EventEmitter();
readonly length: number;
readonly length: number = 0;
readonly first: T;
readonly last: T;