From 44c303aad24fb4bb42e2eb64592ff87e7bc2c405 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 1 Sep 2015 20:14:54 -0700 Subject: [PATCH] refactor(collection.ts): simplify ListWrapper.clear implementation --- modules/angular2/src/core/facade/collection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/angular2/src/core/facade/collection.ts b/modules/angular2/src/core/facade/collection.ts index dd3f4ef99e..9380172c98 100644 --- a/modules/angular2/src/core/facade/collection.ts +++ b/modules/angular2/src/core/facade/collection.ts @@ -238,7 +238,7 @@ export class ListWrapper { } return false; } - static clear(list: any[]) { list.splice(0, list.length); } + static clear(list: any[]) { list.length = 0; } static join(list: any[], s: string): string { return list.join(s); } static isEmpty(list: any[]): boolean { return list.length == 0; } static fill(list: any[], value: any, start: number = 0, end: number = null) {