Skip to content

Commit

Permalink
NumberProperty.range and rangeProperty cannot be of type null, phetsi…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Dec 3, 2022
1 parent a8afe18 commit 480e99c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/beerslaw/model/BeersLawSolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class BeersLawSolution extends PhetioObject {
concentration => {
let color = this.solvent.colorProperty.value;
if ( concentration > 0 ) {
const range = this.concentrationProperty.range!;
const range = this.concentrationProperty.range;
const distance = Utils.linear( range.min, range.max, 0, 1, concentration );
color = this.colorRange.interpolateLinear( distance );
}
Expand Down
2 changes: 1 addition & 1 deletion js/beerslaw/view/ConcentrationControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default class ConcentrationControl extends NumberControl {
} );

// convert solution's concentration range from model to view
const concentrationRange = solution.concentrationProperty.range!;
const concentrationRange = solution.concentrationProperty.range;
assert && assert( concentrationRange );
const numberRange = new Range(
transform.modelToView( concentrationRange.min ),
Expand Down
2 changes: 1 addition & 1 deletion js/beerslaw/view/CuvetteNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class CuvetteDragListener extends DragListener {

public constructor( cuvette: Cuvette, modelViewTransform: ModelViewTransform2, snapInterval: number, tandem: Tandem ) {

const widthRange = cuvette.widthProperty.range!;
const widthRange = cuvette.widthProperty.range;
assert && assert( widthRange );

let startX: number; // x coordinate of mouse click
Expand Down
2 changes: 1 addition & 1 deletion js/beerslaw/view/WavelengthPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class WavelengthPanel extends Panel {
} );

assert && assert( light.wavelengthProperty.range );
const numberDisplay = new NumberDisplay( light.wavelengthProperty, light.wavelengthProperty.range!, {
const numberDisplay = new NumberDisplay( light.wavelengthProperty, light.wavelengthProperty.range, {
xMargin: 7,
yMargin: 3,
tandem: options.tandem.createTandem( 'numberDisplay' )
Expand Down

0 comments on commit 480e99c

Please sign in to comment.