Use list to detect acceptable values for communication settings

This commit is contained in:
guerler
2016-11-03 15:53:05 -04:00
parent caf8eb5d4c
commit 962e4f3130
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
port = window.Galaxy.config.communication_server_port,
$chat_icon_element = $( "#show-chat-online" );
/** Check if the user has deactivated the communication in it's personal settings */
if ( window.Galaxy.user.attributes.preferences !== undefined && ( window.Galaxy.user.attributes.preferences.communication_server === '1' || window.Galaxy.user.attributes.preferences.communication_server === 'true' ) ) {
if ( Galaxy.user.attributes.preferences && [ '1', 'true' ].indexOf( Galaxy.user.attributes.preferences.communication_server ) != -1 ) {
// See if the configured communication server is available
$.ajax({
url: host + ":" + port,
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long