From ccb9ba33076c7d2927ea6dacec0a7925f291a515 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Wed, 12 Jun 2024 23:23:33 -0300 Subject: [PATCH] refactor: Improve GenericModal coloredContent function Update the coloredContent function in GenericModal to ensure the input value is converted to a string before applying replacements. This change improves the reliability and consistency of the function. --- src/frontend/src/modals/genericModal/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx index 250192dc9..227bcd705 100644 --- a/src/frontend/src/modals/genericModal/index.tsx +++ b/src/frontend/src/modals/genericModal/index.tsx @@ -99,6 +99,7 @@ export default function GenericModal({ setInputValue(value); }, [value, modalOpen]); const coloredContent = (inputValue || "") + ?.toString() .replace(//g, ">") .replace(regexHighlight, (match, p1, p2) => {