Open WYinGYA opened 2 years ago
Object.deepExtend = (function f(destination, source){ for (var property in source) { if (source[property] && source[property].constructor && source[property].constructor === Object) { destination[property] = destination[property] || {}; f(destination[property], source[property]); } else { destination[property] = source[property]; } } return destination; })
同样的问题,解决没有 @WYinGYA
Object.deepExtend = (function f(destination, source){ for (var property in source) { if (source[property] && source[property].constructor && source[property].constructor === Object) { destination[property] = destination[property] || {}; f(destination[property], source[property]); } else { destination[property] = source[property]; } } return destination; })