File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
extension/src/json-viewer Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 11var extractJSON = require ( './extract-json' ) ;
22
33function allTextNodes ( nodes ) {
4- return Object . keys ( nodes ) . reduce ( function ( result , key ) {
5- return result && nodes [ key ] . nodeName = == '#text'
6- } , true )
4+ return ! Object . keys ( nodes ) . some ( function ( key ) {
5+ return nodes [ key ] . nodeName ! == '#text'
6+ } )
77}
88
99function getPreWithSource ( ) {
1010 var childNodes = document . body . childNodes ;
1111
1212 if ( childNodes . length === 0 ) {
13- null
13+ return null
1414 }
1515
1616 if ( childNodes . length > 1 && allTextNodes ( childNodes ) ) {
Original file line number Diff line number Diff line change 2121 "sweetalert" : " 1.0.x" ,
2222 "webpack" : " 1.12.x"
2323 },
24- "engines" : {
25- "node" : " 7.0" ,
26- "npm" : " 3.10"
27- },
2824 "scripts" : {
2925 "release" : " NODE_ENV=production npm run build" ,
3026 "build" : " ./node_modules/.bin/webpack --progress --colors && node ./lib/release-script"
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments