diff --git a/modules/change_detection/src/parser/context_with_variable_bindings.js b/modules/change_detection/src/parser/context_with_variable_bindings.js index 2f4b630e81..0ae0f325e5 100644 --- a/modules/change_detection/src/parser/context_with_variable_bindings.js +++ b/modules/change_detection/src/parser/context_with_variable_bindings.js @@ -31,7 +31,7 @@ export class ContextWithVariableBindings { } clearValues() { - for (var [k, v] of MapWrapper.iterable(this.varBindings)) { + for (var k of MapWrapper.keys(this.varBindings)) { MapWrapper.set(this.varBindings, k, null); } } diff --git a/modules/facade/src/collection.dart b/modules/facade/src/collection.dart index d39ebd5099..113ea9d150 100644 --- a/modules/facade/src/collection.dart +++ b/modules/facade/src/collection.dart @@ -50,6 +50,8 @@ class MapWrapper { static void delete(m, k) { m.remove(k); } static void clear(m) { m.clear(); } static Iterable iterable(m) { return new IterableMap(m); } + static Iterable keys(m) { return m.keys; } + static Iterable values(m) { return m.values; } } // TODO: how to export StringMap=Map as a type? diff --git a/modules/facade/src/collection.es6 b/modules/facade/src/collection.es6 index b6e7807b8c..67571b571b 100644 --- a/modules/facade/src/collection.es6 +++ b/modules/facade/src/collection.es6 @@ -25,6 +25,8 @@ export class MapWrapper { static delete(m, k) { m.delete(k); } static clear(m) { m.clear(); } static iterable(m) { return m; } + static keys(m) { return m.keys(); } + static values(m) { return m.values(); } } // TODO: cannot export StringMap as a type as Dart does not support renaming types...