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

Commit 7bb5a0f

Browse files
committed
Extend function fix
Extend function of Angular blindly overwrites destination values even if source value is undefined. This fix allows "default" values to remain intact if new value is undefined.
1 parent 33c6738 commit 7bb5a0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Angular.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ function extend(dst) {
233233
forEach(arguments, function(obj){
234234
if (obj !== dst) {
235235
forEach(obj, function(value, key){
236-
dst[key] = value;
236+
if(value !== undefined) {
237+
dst[key] = value;
238+
}
237239
});
238240
}
239241
});

0 commit comments

Comments
 (0)