Merge branch 'develop' of https://github.com/rowyio/rowy into multi-file-upload

This commit is contained in:
Han Tuerker
2022-11-15 08:31:18 +03:00

View File

@@ -40,13 +40,14 @@ export default function Json({
const [editor, setEditor] = useAtom(jsonEditorAtom, projectScope);
const [codeValid, setCodeValid] = useState(true);
const sanitizedValue =
const baseValue =
value !== undefined && isValidJson(value)
? value
: column.config?.isArray
? []
: {};
const formattedJson = stringify(sanitizedValue, { space: 2 });
const formattedJson = stringify(baseValue, { space: 2 });
const sanitizedValue = JSON.parse(formattedJson);
if (disabled)
return (