Skip to content

Commit a2a6330

Browse files
committed
[fix]: AngularJS throws illegal invocation.
There's an open issue: angular/angular.js#12004 this fix was taken from angular/angular.js#11665
1 parent 2a81090 commit a2a6330

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/lib/angular/angular.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,11 @@ function copy(source, destination, stackSource, stackDest) {
826826
if (isArray(destination)) {
827827
destination.length = 0;
828828
} else {
829-
forEach(destination, function(value, key) {
830-
delete destination[key];
831-
});
829+
for (key in destination) {
830+
if (destination.hasOwnProperty(key)) {
831+
delete destination[key];
832+
}
833+
}
832834
}
833835
for (var key in source) {
834836
if (source.hasOwnProperty(key)) {

0 commit comments

Comments
 (0)