Skip to content

Commit

Permalink
Query parameter fallback for uses without initialize-globals
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Feb 8, 2024
1 parent fc8ed35 commit bf81ff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/soundManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ class SoundManager extends PhetioObject {
'its children can be ignored.'
} );

this.enabledProperty = new BooleanProperty( phet.chipper.queryParameters.supportsSound, {
this.enabledProperty = new BooleanProperty( phet?.chipper?.queryParameters?.supportsSound || false, {
tandem: tandem?.createTandem( 'enabledProperty' ),
phetioState: false, // This is a preference, global sound control is handled by the audioManager
phetioDocumentation: 'Determines whether sound is enabled. Supported only if this sim supportsSound=true.'
} );

this.extraSoundEnabledProperty = new BooleanProperty( phet.chipper.queryParameters.extraSoundInitiallyEnabled, {
this.extraSoundEnabledProperty = new BooleanProperty( phet?.chipper?.queryParameters?.extraSoundInitiallyEnabled || false, {
tandem: tandem?.createTandem( 'extraSoundEnabledProperty' ),
phetioState: false, // This is a preference, global sound control is handled by the audioManager
phetioDocumentation: 'Determines whether extra sound is enabled. Extra sound is additional sounds that ' +
Expand Down

0 comments on commit bf81ff4

Please sign in to comment.