Commit dbb428c0 authored by Florian Müllner's avatar Florian Müllner Committed by Florian Müllner

mainWindow: Avoid warning when no room was selected previously

On startup we first load the previously joined rooms, then select
the last selected one. However the setting for the latter may return
an empty object (when there were no rooms to restore), resulting in
a JS warning about accessing an undefined property.

Add a check to avoid that warning.

parent 992a98dd
Pipeline #67482 passed with stages
in 7 minutes and 29 seconds
......@@ -330,6 +330,9 @@ var MainWindow = GObject.registerClass({
for (let prop in selectedRoom)
selectedRoom[prop] = selectedRoom[prop].deep_unpack();
if (!selectedRoom.hasOwnProperty('account'))
let roomId = null;
let account = this._accountsMonitor.lookupAccount(selectedRoom.account);
let channelName =;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment