mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-20 06:29:32 +02:00
chore: compute only if value
This commit is contained in:
@@ -122,7 +122,7 @@ export default function PrettifyJson({ title }: ToolComponentProps) {
|
||||
const formRef = useRef<FormikProps<InitialValuesType>>(null);
|
||||
const compute = (optionsValues: InitialValuesType, input: any) => {
|
||||
const { indentationType, spacesCount } = optionsValues;
|
||||
setResult(beautifyJson(input, indentationType, spacesCount));
|
||||
if (input) setResult(beautifyJson(input, indentationType, spacesCount));
|
||||
};
|
||||
|
||||
const getGroups: GetGroupsType<InitialValuesType> = ({
|
||||
|
Reference in New Issue
Block a user