mirror of https://github.com/vector-im/riot-web
Merge pull request #1576 from matrix-org/luke/throw-on-undefined-group
Throw an error when trying to create a group store with falsey groupIdpull/21833/head
commit
48def50fec
|
@ -33,6 +33,9 @@ export default class GroupStore extends EventEmitter {
|
||||||
|
|
||||||
constructor(matrixClient, groupId) {
|
constructor(matrixClient, groupId) {
|
||||||
super();
|
super();
|
||||||
|
if (!groupId) {
|
||||||
|
throw new Error('GroupStore needs a valid groupId to be created');
|
||||||
|
}
|
||||||
this.groupId = groupId;
|
this.groupId = groupId;
|
||||||
this._matrixClient = matrixClient;
|
this._matrixClient = matrixClient;
|
||||||
this._summary = {};
|
this._summary = {};
|
||||||
|
|
Loading…
Reference in New Issue