mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 02:35:48 +03:00
Throw an error when trying to create a group store with falsey groupId
This commit is contained in:
parent
3fd5937687
commit
febeb0429e
1 changed files with 3 additions and 0 deletions
|
@ -33,6 +33,9 @@ export default class GroupStore extends EventEmitter {
|
|||
|
||||
constructor(matrixClient, groupId) {
|
||||
super();
|
||||
if (!groupId) {
|
||||
throw new Error('GroupStore needs a valid groupId to be created');
|
||||
}
|
||||
this.groupId = groupId;
|
||||
this._matrixClient = matrixClient;
|
||||
this._summary = {};
|
||||
|
|
Loading…
Reference in a new issue