Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing workspace bug #1533

Merged
merged 2 commits into from
Mar 24, 2021
Merged

Missing workspace bug #1533

merged 2 commits into from
Mar 24, 2021

Conversation

jameskerr
Copy link
Member

@jameskerr jameskerr commented Mar 24, 2021

Added a global function called navTo(path). You can use this in the dev tools to go to a specific url.

If you open the dev tools and type navTo("/workspaces/does-not-exist"), then you will reproduce the bug reported at #1529.

A simple null check fixed it. An integration test has been added to check for this now.

closes #1529

Copy link
Contributor

@mason-fish mason-fish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@@ -21,6 +21,12 @@ const SpinnerWrap = styled.div`
justify-content: center;
`

function GetWorkspace({children}) {
const workspace = useSelector(Current.getWorkspace)
if (!workspace) return <Redirect to="/workspaces" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jameskerr jameskerr merged commit 1ab4585 into master Mar 24, 2021
@jameskerr jameskerr deleted the missing-workspace-bug branch March 24, 2021 22:46
@philrz philrz linked an issue Apr 2, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Brim CI failure: "TypeError: Cannot read property 'name' of undefined"
2 participants