Skip to content

Commit 56ed06d

Browse files
committed
Merge branch 'text-node-bug' of github.com:benvan/json-viewer into text-node-bug
2 parents 3c31a0a + 8f615e2 commit 56ed06d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extension/src/json-viewer/check-if-json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var extractJSON = require('./extract-json');
33
function getPreWithSource() {
44
var childNodes = document.body.childNodes;
55

6-
if (childNodes.length > 1){
6+
if (childNodes.length > 1 && childNodes[0].nodeName === "#text"){
77
document.body.normalize() // concatenates adjacent text nodes
88
}
99

0 commit comments

Comments
 (0)