Skip to content

Commit a3445c9

Browse files
committed
Fix ESLint issues in DynamicJsonForm.tsx
- Remove unnecessary escape character in regex pattern - Add missing schema dependency to useCallback hook
1 parent 8d149b2 commit a3445c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/components/DynamicJsonForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ const DynamicJsonForm = forwardRef<DynamicJsonFormRef, DynamicJsonFormProps>(
114114

115115
// Reset to default for clearly invalid JSON (not just incomplete typing)
116116
const trimmed = jsonString.trim();
117-
if (trimmed.length > 5 && !trimmed.match(/^[\s\[{]/)) {
117+
if (trimmed.length > 5 && !trimmed.match(/^[\s[{]/)) {
118118
onChange(generateDefaultValue(schema));
119119
}
120120
}
121121
}, 300);
122122
},
123-
[onChange, setJsonError],
123+
[onChange, setJsonError, schema],
124124
);
125125

126126
// Update rawJsonValue when value prop changes

0 commit comments

Comments
 (0)