@@ -283,6 +283,7 @@ export default class LiveCode extends ActiveCode {
283283 processJobeResponse ( result ) {
284284 var logresult ;
285285 var odiv = this . output ;
286+ this . parsedOutput = { } ;
286287 $ ( this . runButton ) . removeAttr ( "disabled" ) ;
287288 if ( result . outcome === 15 ) {
288289 logresult = "success" ;
@@ -293,16 +294,16 @@ export default class LiveCode extends ActiveCode {
293294 this . errinfo = logresult ;
294295 switch ( result . outcome ) {
295296 case 15 : {
296- let parsedOutput = new JUnitTestParser (
297+ this . parsedOutput = new JUnitTestParser (
297298 result . stdout ,
298299 this . divid
299300 ) ;
300- $ ( odiv ) . html ( parsedOutput . stdout ) ;
301+ $ ( odiv ) . html ( this . parsedOutput . stdout ) ;
301302 if ( this . suffix ) {
302- if ( parsedOutput . pct === undefined ) {
303- parsedOutput . pct = parsedOutput . passed = parsedOutput . failed = 0 ;
303+ if ( this . parsedOutput . pct === undefined ) {
304+ this . parsedOutput . pct = this . parsedOutput . passed = this . parsedOutput . failed = 0 ;
304305 }
305- this . unit_results = `percent:${ parsedOutput . pct } :passed:${ parsedOutput . passed } :failed:${ parsedOutput . failed } ` ;
306+ this . unit_results = `percent:${ this . parsedOutput . pct } :passed:${ this . parsedOutput . passed } :failed:${ this . parsedOutput . failed } ` ;
306307 }
307308 break ;
308309 }
@@ -339,7 +340,7 @@ export default class LiveCode extends ActiveCode {
339340 if ( rdiv ) {
340341 rdiv . remove ( ) ;
341342 }
342- if ( this . parsedOutput . table ) {
343+ if ( this . parsedOutput && this . parsedOutput . table ) {
343344 this . outDiv . appendChild ( this . parsedOutput . table ) ;
344345 }
345346 rdiv = document . getElementById ( `${ this . divid } _unit_results` ) ;
0 commit comments