mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-05-06 05:38:51 +00:00
fix: public_note validation rejects non-object JSON values, preventing second edit (#154)
Co-authored-by: naiba <naiba@users.noreply.github.com>
This commit is contained in:
@@ -72,6 +72,7 @@ const serverFormSchema = z.object({
|
||||
if (s.length === 0) return true
|
||||
try {
|
||||
const obj = JSON.parse(s)
|
||||
if (typeof obj !== "object" || obj === null) return true
|
||||
return PublicNoteSchema.safeParse(obj).success
|
||||
} catch {
|
||||
// skip check if not JSON
|
||||
|
||||
Reference in New Issue
Block a user