throw error if workspace is undefined (#1773)
This commit is contained in:
parent
0947babe50
commit
a9d397c5e1
1 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,11 @@ export const initialLoad = createAsyncThunk(
|
|||
client.getAllBlocks(),
|
||||
getUserWorkspaces(),
|
||||
])
|
||||
|
||||
// if no workspace, either bad id, or user doesn't have access
|
||||
if (workspace === undefined) {
|
||||
throw new Error('Workspace undefined')
|
||||
}
|
||||
return {
|
||||
workspace,
|
||||
workspaceUsers,
|
||||
|
|
Loading…
Reference in a new issue