Fix initial channel creation bug in frontend
This commit is contained in:
@@ -162,7 +162,11 @@ export class MainView extends View {
|
||||
if (state.defaultChannelId) {
|
||||
this.switchChannel(state.defaultChannelId.toString());
|
||||
} else {
|
||||
this.switchChannel(state.channelList.channels[0].id.toString());
|
||||
if (state.channelList.channels.length > 0) {
|
||||
this.switchChannel(state.channelList.channels[0].id.toString());
|
||||
} else {
|
||||
this.createNewChannel();
|
||||
}
|
||||
}
|
||||
}
|
||||
state.save();
|
||||
|
||||
Reference in New Issue
Block a user