From a98e39374d34d3fdd205d7f3c4c53b7e92363a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 24 Feb 2013 15:41:06 -0800 Subject: [PATCH] Make PaperScript work again with latest Acorn.js --- src/core/PaperScript.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/PaperScript.js b/src/core/PaperScript.js index 121201a1..427d38fb 100644 --- a/src/core/PaperScript.js +++ b/src/core/PaperScript.js @@ -142,7 +142,9 @@ var PaperScript = this.PaperScript = new function() { if (Array.isArray(value)) { for (var i = 0, l = value.length; i < l; i++) walkAst(value[i]); - } else if (Base.isPlainObject(value)) { + } else if (value && typeof value === 'object') { + // We cannot use Base.isPlainObject() for these since + // Acorn.js uses its own internal prototypes now. walkAst(value); } }