From b6ee20846b10e20b7a4670347e16b1fbb573261b Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Mon, 10 Aug 2015 18:33:30 -0400 Subject: [PATCH] fix(benchmarks): remove reference to String.prototype.contains() https://github.com/tc39/tc39-notes/blob/master/es6/2014-11/nov-18.md#51--44-arrayprototypecontains-and-stringprototypecontains removed String.prototype.contains() from standard, and is not implemented in most runtimes (SpiderMonkey still being an exception). Closes #3570 --- modules/benchmarks/src/naive_infinite_scroll/common.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/benchmarks/src/naive_infinite_scroll/common.ts b/modules/benchmarks/src/naive_infinite_scroll/common.ts index eb82453836..edf9cbaa95 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/common.ts +++ b/modules/benchmarks/src/naive_infinite_scroll/common.ts @@ -1,5 +1,5 @@ import {Math} from 'angular2/src/facade/math'; - +import {StringWrapper} from 'angular2/src/facade/lang'; import {ListWrapper, Map, MapWrapper} from 'angular2/src/facade/collection'; export var ITEMS = 1000; @@ -86,7 +86,7 @@ export class RawEntity { } remove(key: string) { - if (!key.contains('.')) { + if (!StringWrapper.contains(key, '.')) { return MapWrapper.delete(this._data, key); } var pieces = key.split('.');