mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
use hasOwnProperty for safe for in
loop on defaults
This commit is contained in:
@ -20,7 +20,7 @@ export function defaults(dest) {
|
||||
for (let i = arguments.length - 1; i >= 1; i--) {
|
||||
let source = arguments[i] || {};
|
||||
for (let key in source) {
|
||||
if (!dest.hasOwnProperty(key)) {
|
||||
if (source.hasOwnProperty(key) && !dest.hasOwnProperty(key)) {
|
||||
dest[key] = source[key];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user