1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

fix: truncator (#1148)

* fix: truncator

* Update src/component/common/StringTruncator/StringTruncator.tsx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
This commit is contained in:
Fredrik Strand Oseberg 2022-07-26 08:58:57 +02:00 committed by GitHub
parent d4f46eaf2e
commit 23b9cbaf03

View File

@ -17,7 +17,7 @@ const StringTruncator = ({
}: IStringTruncatorProps) => {
return (
<ConditionallyRender
condition={text.length > maxLength}
condition={(text?.length ?? 0) > maxLength}
show={
<Tooltip title={text} arrow>
<span