mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-05 09:10:26 +00:00
ensure exhaustive checks
This commit is contained in:
parent
50164dc629
commit
bd6c24d35a
1 changed files with 6 additions and 1 deletions
|
@ -46,8 +46,13 @@ export function filterZeroValues(details: Details): Details {
|
|||
return !!detail.text;
|
||||
case "link":
|
||||
return !!detail.text && !!detail.href;
|
||||
default:
|
||||
case undefined:
|
||||
case "text":
|
||||
case "markdown":
|
||||
return detail.text !== null && detail.text !== "" && detail.text !== undefined;
|
||||
default:
|
||||
console.warn("Unknown detail type (this should never happen)", detail);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue