File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -391,11 +391,15 @@ export class GCodeTreeParser {
391391 } else {
392392 x = - 1 ;
393393 }
394+
394395 node = new NavTreeNode (
395- `Spindle On ${ words [ i + x ] . substr ( 1 ) } RPM` + ' CW' ,
396+ `Spindle On ${ words [ i + x ] . substr ( 1 ) === undefined ? '' : words [ i + x ] . substr ( 1 ) } RPM` +
397+ ' CW' ,
396398 TreeItemCollapsibleState . None ,
397399 ) ;
398- node . tooltip = `Spindle On Clockwise (${ words [ i + x ] . substr ( 1 ) } RPM)` ;
400+ node . tooltip = `Spindle On Clockwise (${
401+ words [ i + x ] . substr ( 1 ) === undefined ? '' : words [ i + x ] . substr ( 1 )
402+ } RPM)`;
399403 node . setIcon ( IconType . SpindleCW ) ;
400404 node . command = {
401405 command : 'gcode.views.navTree.select' ,
@@ -415,10 +419,13 @@ export class GCodeTreeParser {
415419 x = - 1 ;
416420 }
417421 node = new NavTreeNode (
418- `Spindle On ${ words [ i + x ] . substr ( 1 ) } RPM` + ' CCW' ,
422+ `Spindle On ${ words [ i + x ] . substr ( 1 ) === undefined ? '' : words [ i + x ] . substr ( 1 ) } RPM` +
423+ ' CCW' ,
419424 TreeItemCollapsibleState . None ,
420425 ) ;
421- node . tooltip = `Spindle On Counter Clockwise (${ words [ i + x ] . substr ( 1 ) } RPM)` ;
426+ node . tooltip = `Spindle On Counter Clockwise (${
427+ words [ i + x ] . substr ( 1 ) === undefined ? '' : words [ i + x ] . substr ( 1 )
428+ } RPM)`;
422429 node . setIcon ( IconType . SpindleCCW ) ;
423430 node . command = {
424431 command : 'gcode.views.navTree.select' ,
You can’t perform that action at this time.
0 commit comments