fix error if no user is logged in

This commit is contained in:
Bjoern Gruening
2016-06-08 14:23:47 +02:00
parent 4d186982ce
commit 3dbd6d8074
+2 -2
View File
@@ -136,11 +136,11 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
/** Check if the communication server is online and show the icon otherwise hide the icon */
_checkCommunicationServerOnline: function(){
var host = window.Galaxy.config.communication_server_host,
var host = window.Galaxy.config.communication_server_host,
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.communication_server === '1') {
if (window.Galaxy.user.attributes.preferences !== undefined && window.Galaxy.user.attributes.preferences.communication_server === '1') {
// See if the configured communication server is available
$.ajax({
url: host + ":" + port,