Show error if savedFilterId not present (#3129)

This commit is contained in:
WithoutPants 2022-11-16 10:09:50 +11:00 committed by GitHub
parent dc820e29af
commit 0443439fae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -167,6 +167,10 @@ interface IProps {
export const Control: React.FC<IProps> = ({ content }) => {
switch (content.__typename) {
case "SavedFilter":
if (!(content as ISavedFilterRow).savedFilterId) {
return <div>Error: missing savedFilterId</div>;
}
return (
<SavedFilterResults
savedFilterID={(content as ISavedFilterRow).savedFilterId.toString()}