Sindarius / npm_gcodeviewer

Avoid use of == and != JS-0050
Anti-pattern
Minor
3 months agoa year old
Expected '!==' and instead saw '!='
 921      this.renderInstances.push(renderer);
 922
 923      let linesToRender = this.lines.slice(0, this.linesIndex - 1);
 924      if (linesToRender != null && linesToRender.length > 0) { 925         await renderer.render(linesToRender);
 926      }
 927      this.linesIndex = 0;
Expected '===' and instead saw '=='
671      let value = this.clamp(this.simulationLastUpdate / this.simulationTimeToMove, 0, 1); 
672      Vector3.LerpToRef(this.simulationCurrentLine.start, this.simulationCurrentLine.end, value, this.simLine); 
673      this.updateToolPosition(this.simLine); 
674      if (this.simulationLastUpdate >= this.simulationTimeToMove || this.simulationTimeToMove == Infinity || this.simulationTimeToMove == 0) { 675         let update = this.simulationMultiplier > 10 ? this.simulationMultiplier : 1; 
676         let ratio = this.scene.getAnimationRatio() 
677         if (ratio > 3) { update += ~~ratio; } 
Expected '===' and instead saw '=='
671      let value = this.clamp(this.simulationLastUpdate / this.simulationTimeToMove, 0, 1); 
672      Vector3.LerpToRef(this.simulationCurrentLine.start, this.simulationCurrentLine.end, value, this.simLine); 
673      this.updateToolPosition(this.simLine); 
674      if (this.simulationLastUpdate >= this.simulationTimeToMove || this.simulationTimeToMove == Infinity || this.simulationTimeToMove == 0) { 675         let update = this.simulationMultiplier > 10 ? this.simulationMultiplier : 1; 
676         let ratio = this.scene.getAnimationRatio() 
677         if (ratio > 3) { update += ~~ratio; } 
Expected '!==' and instead saw '!='
656         this.simulationStopped(); 
657      } 
658 
659      if (this.simulationCurrentLine != this.gcodeProcessor.renderedLines[this.gcodeProcessor.lastFilePositionIndex]) { 660         this.simulationCurrentLine = this.gcodeProcessor.renderedLines[this.gcodeProcessor.lastFilePositionIndex]; 
661         this.updateToolPosition(this.simulationCurrentLine.start); 
662         this.simulationLastUpdate = 0; 
Expected '===' and instead saw '=='
 25 
 26      for (var lineIdx = 0; lineIdx < lines.length; lineIdx++) { 
 27         let line = lines[lineIdx]; 
 28         if (line == null) break;  29         let tool = this.tools[line.tool]; 
 30 
 31         gcodeLineIndex[lineIdx] = line.gcodeFilePosition;