Skip to content

Commit

Permalink
required options can't have defaults in optionize defaults, phetsims/…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jan 9, 2023
1 parent 9051cf3 commit 081ffdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/common/view/IndexOfRefractionControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Utils from '../../../../dot/js/Utils.js';
import NumberProperty from '../../../../axon/js/NumberProperty.js';
import PickRequired from '../../../../phet-core/js/types/PickRequired.js';
import optionize, { combineOptions, EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import StrictOmit from '../../../../phet-core/js/types/StrictOmit.js';

type SelfOptions = EmptySelfOptions;

Expand All @@ -26,7 +27,7 @@ export default class IndexOfRefractionControl extends NumberControl {
const range = indexOfRefractionProperty.range;

// Assemble the defaults for NumberControl, because optionize doesn't support defaults in multiple objects.
const numberControlDefaults = combineOptions<NumberControlOptions>( {}, GOConstants.NUMBER_CONTROL_OPTIONS, {
const numberControlDefaults = combineOptions<StrictOmit<NumberControlOptions, 'tandem'>>( {}, GOConstants.NUMBER_CONTROL_OPTIONS, {
delta: GOConstants.INDEX_OF_REFRACTION_SPINNER_STEP,
sliderOptions: {
constrainValue: ( value: number ) =>
Expand Down

0 comments on commit 081ffdb

Please sign in to comment.