Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e54492c

Browse files
committed
fix(ngClass): fix shallowCopy of mixed array and object
1 parent bd97464 commit e54492c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ng/directive/ngClass.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ function classDirective(name, selector) {
7878
updateClasses(oldClasses, newClasses);
7979
}
8080
}
81-
oldVal = shallowCopy(newVal);
81+
if (isArray(newVal)) {
82+
oldVal = newVal.map(function(v) { return shallowCopy(v); });
83+
} else {
84+
oldVal = shallowCopy(newVal);
85+
}
8286
}
8387
}
8488
};

0 commit comments

Comments
 (0)