From 146f803547b1dad73b5564b04b0d2203151831a0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 22 Jan 2013 18:22:22 -0800 Subject: let dump() avoid funcData pitfalls --- src/utility.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utility.js b/src/utility.js index 63582ae8..8db37c61 100644 --- a/src/utility.js +++ b/src/utility.js @@ -10,6 +10,10 @@ function safeQuote(x) { function dump(item) { try { + if (typeof item == 'object' && item !== null && item.funcData) { + var funcData = item.funcData; + item.funcData = null; + } return '// ' + JSON.stringify(item, null, ' ').replace(/\n/g, '\n// '); } catch(e) { var ret = []; @@ -22,6 +26,8 @@ function dump(item) { } } return ret.join(',\n'); + } finally { + if (funcData) item.funcData = funcData; } } -- cgit v1.2.3-18-g5258