From 16b70e723f411088a4f1a2a9d94fd7702fdca7dc Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 1 Jun 2012 13:26:27 -0700 Subject: Manually Add Fix for Montage serialization problem --- node_modules/montage/core/serializer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'node_modules') diff --git a/node_modules/montage/core/serializer.js b/node_modules/montage/core/serializer.js index 72543328..deadbc68 100755 --- a/node_modules/montage/core/serializer.js +++ b/node_modules/montage/core/serializer.js @@ -529,10 +529,10 @@ var Serializer = Montage.create(Montage, /** @lends module:montage/serializer.Se return this._serializeElement(value); } else if (Array.isArray(value)) { return this._serializeArray(value, indent + 1); - } else if (Object.getPrototypeOf(value) === Object.prototype) { - return this._serializeObjectLiteral(value, null, indent + 1); } else if (value.constructor === Function) { return this._serializeFunction(value, indent); + } else if (!("getInfoForObject" in value)) { // we consider object literals the ones who aren't a Montage object + return this._serializeObjectLiteral(value, null, indent + 1); } else { // TODO: should refactor this to handle references here, doesn't make // sense to wait until it hits _serializeObject for that to happen -- cgit v1.2.3