diff options
author | ache <ache@ache.one> | 2018-01-04 05:47:16 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2018-01-04 05:47:16 +0100 |
commit | d2941b43d4ffbb5ffd1ec08ffaa8c13a93bfabd8 (patch) | |
tree | 9e6db6688e66f10a0eaff6a115e4acae791e36a3 /app.js | |
parent | Fix name (diff) |
Fix catch qcm
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -31,11 +31,14 @@ function visitList(ast, vFile) { var tab = [] Array.from(node.children).forEach( ( nodeC ) => { - if( nodeC.children[0].type == 'paragraph' ) { - if( "~!=".indexOf(nodeC.children[0].children[0].value[0]) < 0) { + if( nodeC.children && nodeC.children[0].type == 'paragraph' ) { + if( nodeC.children[0].children && nodeC.children[0].children[0].value ) { + if( "~!=".indexOf(nodeC.children[0].children[0].value[0]) < 0) + isQcm = false; + } else isQcm = false; - } - } + } else + isQcm = false; }); if( isQcm ) { Array.from(node.children).forEach( ( nodeC ) => { |