Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix one test
  • Loading branch information
ExplodingCabbage committed Apr 7, 2025
commit 112e61b9f3d0915f175bb4b824a0e871b1fd5811
2 changes: 1 addition & 1 deletion src/diff/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jsonDiff.tokenize = lineDiff.tokenize;
jsonDiff.castInput = function(value, options) {
const {undefinedReplacement, stringifyReplacer = (k, v) => typeof v === 'undefined' ? undefinedReplacement : v} = options;

return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), null, ' ');
};
jsonDiff.equals = function(left, right, options) {
return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options);
Expand Down