throw error if workspace is undefined (#1773)

This commit is contained in:
Scott Bishel 2021-11-08 09:49:59 -07:00 committed by GitHub
parent 0947babe50
commit a9d397c5e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,