mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
fixed issue with extending null properties
This commit is contained in:
parent
d54ccb90a6
commit
56768a4c9d
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ var Common = {};
|
||||||
|
|
||||||
if (source) {
|
if (source) {
|
||||||
for (var prop in source) {
|
for (var prop in source) {
|
||||||
if (deepClone && source[prop].constructor === Object) {
|
if (deepClone && source[prop] && source[prop].constructor === Object) {
|
||||||
if (!obj[prop] || obj[prop].constructor === Object) {
|
if (!obj[prop] || obj[prop].constructor === Object) {
|
||||||
obj[prop] = obj[prop] || {};
|
obj[prop] = obj[prop] || {};
|
||||||
Common.extend(obj[prop], deepClone, source[prop]);
|
Common.extend(obj[prop], deepClone, source[prop]);
|
||||||
|
|
Loading…
Reference in a new issue