mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-25 13:39:06 -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) {
|
||||
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) {
|
||||
obj[prop] = obj[prop] || {};
|
||||
Common.extend(obj[prop], deepClone, source[prop]);
|
||||
|
|
Loading…
Reference in a new issue