Skip to content

Commit

Permalink
use audioManager instead of query param, see #746
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Oct 20, 2021
1 parent 3eeb7cb commit 5b89aa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/preferences/PreferencesDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Node from '../../../scenery/js/nodes/Node.js';
import Text from '../../../scenery/js/nodes/Text.js';
import Dialog from '../../../sun/js/Dialog.js';
import HSeparator from '../../../sun/js/HSeparator.js';
import audioManager from '../audioManager.js';
import joist from '../joist.js';
import joistStrings from '../joistStrings.js';
import PreferencesPanels from './PreferencesPanels.js';
Expand Down Expand Up @@ -85,7 +86,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 ) && phet.chipper.queryParameters.audio !== 'disabled' ) && supportedTabs.push( PreferencesTab.AUDIO );
( _.some( preferencesConfiguration.audioOptions, entry => !!entry ) && audioManager.supportsAudio ) && 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 5b89aa7

Please sign in to comment.