fix unkown type.

This commit is contained in:
NicolasMontone
2025-04-02 10:41:33 -03:00
parent c964ff5cfe
commit 8b31f495ba

View File

@@ -63,7 +63,7 @@ const JsonView = memo(
const handleCopy = useCallback(() => {
try {
navigator.clipboard.writeText(JSON.stringify(normalizedData, null, 2));
navigator.clipboard.writeText(typeof normalizedData === "string" ? normalizedData : JSON.stringify(normalizedData, null, 2));
setCopied(true);
} catch (error) {
toast({