Remove unnecessarily forcing non-undefined

This commit is contained in:
Robert
2023-07-17 17:02:59 +01:00
parent f1e96f7812
commit 679266c0b7

View File

@@ -29,7 +29,7 @@ export function Location({
handleClick,
}: Props): JSX.Element {
const resolvableLoc = useMemo(() => tryGetResolvableLocation(loc), [loc]);
const displayLabel = useMemo(() => convertNonPrintableChars(label!), [label]);
const displayLabel = useMemo(() => convertNonPrintableChars(label), [label]);
if (loc === undefined) {
return <NonClickableLocation msg={displayLabel} />;
} else if (isStringLoc(loc)) {