diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-22 18:22:22 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-22 18:22:22 -0800 |
commit | 146f803547b1dad73b5564b04b0d2203151831a0 (patch) | |
tree | 0e4efe84358f6b691862bf4ca51056bbb4ad9707 /src/utility.js | |
parent | 857f0e302120bf5bd95be0982a5af56eeacd4474 (diff) |
let dump() avoid funcData pitfalls
Diffstat (limited to 'src/utility.js')
-rw-r--r-- | src/utility.js | 6 |
1 files changed, 6 insertions, 0 deletions
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; } } |