From 9eed9b113427ca250c07433eea988666b544202a Mon Sep 17 00:00:00 2001 From: Manish Kushare Date: Tue, 26 Apr 2022 19:34:39 +0530 Subject: [PATCH] Fixes text widget not showing zero and false (#2877) * fixed Text Widget not showing zero and false * made the required changes --- frontend/src/Editor/Components/Text.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/Editor/Components/Text.jsx b/frontend/src/Editor/Components/Text.jsx index 4eb4f9d105..63cd592c21 100644 --- a/frontend/src/Editor/Components/Text.jsx +++ b/frontend/src/Editor/Components/Text.jsx @@ -5,7 +5,9 @@ export const Text = function Text({ height, properties, styles, darkMode }) { const [loadingState, setLoadingState] = useState(false); const { textColor, textAlign, visibility, disabledState } = styles; - const text = properties.text ?? ''; + + const text = properties.text === 0 || properties.text === false ? properties.text?.toString() : properties.text; + const color = textColor === '#000' ? (darkMode ? '#fff' : '#000') : textColor; useEffect(() => {