Skip to content

Commit

Permalink
feat: improve patch message
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed May 24, 2018
1 parent eedb519 commit 4294359
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modifiers/j.js
Expand Up @@ -15,7 +15,9 @@ module.exports = function (value/*, placeholder, argIndex, args*/) {
try {
return JSON.stringify(value, null, 2);
} catch (e) {
if (e.message === CIRCULAR_JSON_ERROR_MESSAGE) return "[Circular JSON]";
if (e.message === CIRCULAR_JSON_ERROR_MESSAGE) {
return "<Circular (non-JSON serializable) value>";
}
return "<Non-serializable (to JSON) value>";
}
};

0 comments on commit 4294359

Please sign in to comment.