Skip to content

Commit

Permalink
Do not display audio controls when audio is disabled by query paramet…
Browse files Browse the repository at this point in the history
…er, see #746

(cherry picked from commit ed6c7a6)
  • Loading branch information
jessegreenberg authored and jbphet committed Oct 1, 2021
1 parent 47ac4b7 commit 5455b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/preferences/PreferencesDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class PreferencesDialog extends Dialog {
const supportedTabs = [];
supportedTabs.push( PreferencesTab.GENERAL ); // There is always a "General" tab
_.some( preferencesConfiguration.visualOptions, entry => !!entry ) && supportedTabs.push( PreferencesTab.VISUAL );
_.some( preferencesConfiguration.audioOptions, entry => !!entry ) && supportedTabs.push( PreferencesTab.AUDIO );
( _.some( preferencesConfiguration.audioOptions, entry => !!entry ) && phet.chipper.queryParameters.audio !== 'disabled' ) && supportedTabs.push( PreferencesTab.AUDIO );
_.some( preferencesConfiguration.inputOptions, entry => !!entry ) && supportedTabs.push( PreferencesTab.INPUT );
assert && assert( supportedTabs.length > 0, 'Trying to create a PreferencesDialog with no tabs, check PreferencesConfiguration' );

Expand Down

0 comments on commit 5455b6e

Please sign in to comment.