Fix bug favorite optimistic rendering and opportunity prefill (#2633)

* Fix bug favorite optimistic rendering and opportunity prefill

* Fixes
This commit is contained in:
Charles Bochet
2023-11-22 11:43:40 +01:00
committed by GitHub
parent 10febd9aeb
commit 8f623ceb5c
6 changed files with 105 additions and 28 deletions

View File

@ -58,7 +58,10 @@ export const ViewBarEffect = () => {
data.edges
.map((view) => view.node)
.find((view) => view.id === currentViewIdFromUrl) ??
data.edges[0].node;
data.edges[0]?.node ??
null;
if (!currentView) return;
set(currentViewIdState, currentView.id);