-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dagit] Fix JS error on repo reload (#8297)
### Summary & Motivation There is currently a JS error that occurs when reloading a single repo from the left nav while viewing the Instance Overview page. It appears to be due to an Apollo bug: when the store is emptied after reloading the repo, the queries in `InstanceOverviewPage` resolve to `{}` instead of `undefined` while data is being repopulated. Because our code currently checks whether `data` is truthy in order to determine whether there are values to extract from it, this results in a JS error because fields expected to be there (and typechecked as such) are missing. To resolve this, use the `loading` values instead. As far as I know, we shouldn't really have to do that, but I don't know if this has been fixed in recent versions of `@apollo/client`. I also fixed some spacing and truncation issues on the repo name at the foot of the left nav. ### How I Tested These Changes View Dagit, reload the current repo via left nav while viewing Instance Overview. Verify that the page reloads and populates properly, with no JS errors.
- Loading branch information
Showing
2 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters