mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 20:47:27 +03:00
interface: prevent crash in reducers on new group DMs
Fixes urbit/landscape#1044
This commit is contained in:
parent
22d0d9557f
commit
efde98d57e
@ -103,6 +103,9 @@ const addMembers = (json: GroupUpdate, state: GroupState): GroupState => {
|
||||
if ('addMembers' in json) {
|
||||
const { resource, ships } = json.addMembers;
|
||||
const resourcePath = resourceAsPath(resource);
|
||||
if(!(resourcePath in state.groups)) {
|
||||
return;
|
||||
}
|
||||
for (const member of ships) {
|
||||
state.groups[resourcePath].members.add(member);
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user