refactor(Differ): cleanup

This commit is contained in:
Victor Berchet
2016-07-15 16:26:19 -07:00
parent b6746cce9c
commit 0914dc35e8
5 changed files with 153 additions and 209 deletions

View File

@ -25,10 +25,9 @@ export class ViewAnimationMap {
}
findAllPlayersByElement(element: any): AnimationPlayer[] {
var players: AnimationPlayer[] = [];
StringMapWrapper.forEach(
this._map.get(element), (player: AnimationPlayer) => players.push(player));
return players;
const el = this._map.get(element);
return el ? StringMapWrapper.values(el) : [];
}
set(element: any, animationName: string, player: AnimationPlayer): void {