0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00

fixed issue with extending null properties

This commit is contained in:
liabru 2014-03-19 12:49:48 +00:00
parent d54ccb90a6
commit 56768a4c9d

View file

@ -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]);