Skip to content

Commit 33fa5a3

Browse files
committed
Fix parsing when node child is null
1 parent ef80281 commit 33fa5a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extension/src/json-viewer/highlighter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Highlighter.prototype = {
142142
decodeText: function(text) {
143143
var div = document.createElement("div");
144144
div.innerHTML = text;
145-
return div.firstChild.nodeValue;
145+
return div.firstChild ? div.firstChild.nodeValue : "";
146146
},
147147

148148
getEditorOptions: function() {

0 commit comments

Comments
 (0)