Fixing a race condition when deleting the only workspace (#1997)

Co-authored-by: Eric Reynolds <eric.reynolds@konghq.com>
This commit is contained in:
Eric Reynolds 2020-03-13 22:12:41 -07:00 committed by GitHub
parent e0d20e5c2c
commit 2f8b0b6602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,7 +337,7 @@ class Wrapper extends React.PureComponent<Props, State> {
message: 'Since you deleted your only workspace, a new one has been created for you.',
});
models.workspace.create({ name: 'Insomnia' });
await models.workspace.create({ name: 'Insomnia' });
}
await models.workspace.remove(activeWorkspace);