From abf5f093184e719e1fb0fe0446f6166279dab927 Mon Sep 17 00:00:00 2001 From: Bucky Schwarz Date: Wed, 27 Jul 2022 11:06:32 -0400 Subject: [PATCH] fix(deepLinks): fix broken check against org reference --- cypress/e2e/shared/deepLinks.test.ts | 1 - src/shared/components/NotFound.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cypress/e2e/shared/deepLinks.test.ts b/cypress/e2e/shared/deepLinks.test.ts index e8e5d64e79..4e5988bd00 100644 --- a/cypress/e2e/shared/deepLinks.test.ts +++ b/cypress/e2e/shared/deepLinks.test.ts @@ -12,7 +12,6 @@ describe('Deep linking', () => { // so you'll probably need to follow-up with the docs and/or marketing teams. it('should be redirected to the approprate page from a shortened link', () => { cy.get('@org').then((org: Organization) => { - cy.wait(1000) cy.visit('/me/about') cy.location('pathname').should('eq', `/orgs/${org.id}/about`) diff --git a/src/shared/components/NotFound.tsx b/src/shared/components/NotFound.tsx index 6883d9d828..f1e9043765 100644 --- a/src/shared/components/NotFound.tsx +++ b/src/shared/components/NotFound.tsx @@ -132,7 +132,7 @@ const NotFound: FC = () => { const org = useRef(reduxOrg) const handleDeepLink = useCallback(async () => { - if (!org) { + if (!org.current) { setIsFetchingOrg(true) org.current = await fetchOrg() }