Skip to content

Commit 85e3a31

Browse files
Merge pull request #34 from canjs/ie11-compat
Do not call Map/Set directly with iterables
2 parents 2a1e16d + ac50344 commit 85e3a31

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

key/key.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ module.exports = function keyObservable(root, keyPath) {
7272

7373
// Register what this observable changes
7474
symbolsToAssign["can.getWhatIChange"] = function getWhatIChange() {
75+
var m = new Map();
76+
var s = new Set();
77+
s.add(lastKey);
78+
m.set(lastParent, s);
7579
return {
7680
mutate: {
77-
keyDependencies: new Map([
78-
[lastParent, new Set([lastKey])]
79-
])
81+
keyDependencies: m
8082
}
8183
};
8284
};

resolver/resolver.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ canReflect.assignMap(ResolverObservable.prototype, {
9696

9797
var contextHandler = handler.bind(this.context);
9898
contextHandler[getChangesSymbol] = function getChangesDependencyRecord() {
99+
var s = new Set();
100+
s.add(resolverInstance);
99101
return {
100-
valueDependencies: new Set([ resolverInstance ])
102+
valueDependencies: s
101103
};
102104
};
103105

0 commit comments

Comments
 (0)