Skip to content

Commit

Permalink
change let -> const if not reassigned, phetsims/tasks#973
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Dec 12, 2018
1 parent 69f0273 commit 5ae83d3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/common/model/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ define( require => {
const angularFrequency = Math.PI * 2 * frequency;

// For 50% longer than one pulse, keep the oscillator fixed at 0 to prevent "ringing"
let waveValue = ( this.pulseFiringProperty.get() && timeSincePulseStarted > period ) ? 0 :
const waveValue = ( this.pulseFiringProperty.get() && timeSincePulseStarted > period ) ? 0 :
-Math.sin( time * angularFrequency + this.phase ) * amplitude;

// assumes a square lattice
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/LightEmitterNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ define( require => {
* @param {boolean} isPrimarySource
*/
constructor( model, waveAreaNode, isPrimarySource ) {
let scene = model.lightScene;
const scene = model.lightScene;
const laserPointerNode = new LaserPointerNode( scene.button1PressedProperty, _.extend( {
rightCenter: waveAreaNode.leftCenter.plusXY( 20, 0 )
}, DEFAULT_OPTIONS ) );
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/WaveInterferenceControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ define( require => {
if ( options.additionalControl ) {options.additionalControl.centerX = centerX;}
sceneRadioButtons.centerX = centerX;
separator.centerX = centerX;
let minX = _.min( [
const minX = _.min( [
frequencySliderContainer.left,
amplitudeSliderContainer.left,
frequencyTitle.left,
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/WaveMeterNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ define( require => {
// Set the range by incorporating the model's time units, so it will match with the timer.
const maxSeconds = NUMBER_OF_TIME_DIVISIONS;

let scene = model.sceneProperty.value;
const scene = model.sceneProperty.value;
if ( model.isWaveMeterInPlayAreaProperty.get() ) {

// Look up the location of the cell. The probe node has the cross-hairs at 0,0, so we can use the
Expand Down

0 comments on commit 5ae83d3

Please sign in to comment.