From 06cd2174ac409808f9d2918aec786a45bc3a1e74 Mon Sep 17 00:00:00 2001 From: igorsatsyuk Date: Tue, 7 Jul 2026 18:08:42 +0300 Subject: [PATCH] Prefer some over find in tag validation --- frontend/src/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/core.js b/frontend/src/core.js index 3ecc702..b91ded7 100644 --- a/frontend/src/core.js +++ b/frontend/src/core.js @@ -46,8 +46,8 @@ export function validateSecretDraft(draft, options = {}) { errors.description = "Description must be 512 characters or fewer."; } - const oversizedTag = parseTags(draft.tags).find((tag) => tag.length > 64); - if (oversizedTag) { + const hasOversizedTag = parseTags(draft.tags).some((tag) => tag.length > 64); + if (hasOversizedTag) { errors.tags = "Tags must be 64 characters or fewer."; }