From 0e16e2d717a4644070750c4ffbcb952b74f0a138 Mon Sep 17 00:00:00 2001 From: Rikki Schulte Date: Sat, 1 Jun 2024 14:03:04 +0200 Subject: [PATCH] fix #105 - validate all strings --- src/features/validation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/validation.ts b/src/features/validation.ts index 2d8fcd4..9243ab5 100644 --- a/src/features/validation.ts +++ b/src/features/validation.ts @@ -128,7 +128,7 @@ export class JSONValidation { const text = view.state.doc.toString(); // ignore blank json strings - if (!text || text.trim().length < 3) return []; + if (!text || !text.length) return []; const json = this.parser(view.state);