Skip to content

Commit 34f2f8e

Browse files
committed
Fix the same null value cannot be compared, e.g. Compare {"a": null} with {"a": null}
1 parent 051e83f commit 34f2f8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/json-diff-presenter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function printJsonDiff(obj, ind, div) {
6363
var singleDiff = json[i];
6464

6565
if(singleDiff.op === 'NONE') {
66-
if(singleDiff.valueType === 'SCALAR') {
66+
if(singleDiff.valueType === 'SCALAR' || singleDiff.valueType === 'NULL') {
6767
_appendToTheOutput(div, singleDiff.op, indent(ind) + getJsonKey(singleDiff.key) + getJsonValue(singleDiff.value) + comma());
6868
} else if(singleDiff.valueType === 'ARRAY') {
6969
_appendToTheOutput(div, singleDiff.op, indent(ind) + getJsonKey(singleDiff.key) + '[');

0 commit comments

Comments
 (0)