This commit is contained in:
cookfront
2017-03-03 16:40:48 +08:00
parent b8a16cabc2
commit 05edb4a391
9 changed files with 23 additions and 21 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
export default function(target, ...sources) {
for (let i = 0; i < sources.length; i++) {
let source = sources[i] || {};
for (let prop in source) {
const source = sources[i] || {};
for (const prop in source) {
if (source.hasOwnProperty(prop)) {
let value = source[prop];
const value = source[prop];
if (value !== undefined) {
target[prop] = value;
}