From cd9d90323ccedc7fbdd866eff50da23d34b8768d Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Mon, 10 Mar 2025 07:34:43 +0100 Subject: [PATCH] chore(share): fix @typescript-eslint/no-unused-vars for unused note variable there's no need to assign a variable, if we never use the value outside of the if check --- src/share/routes.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/share/routes.ts b/src/share/routes.ts index 90018ddab..932adfaac 100644 --- a/src/share/routes.ts +++ b/src/share/routes.ts @@ -344,7 +344,6 @@ function register(router: Router) { shacaLoader.ensureLoad(); const ancestorNoteId = req.query.ancestorNoteId ?? "_share"; - let note; if (typeof ancestorNoteId !== "string") { res.status(400).json({ message: "'ancestorNoteId' parameter is mandatory." }); @@ -352,7 +351,7 @@ function register(router: Router) { } // This will automatically return if no ancestorNoteId is provided and there is no shareIndex - if (!(note = checkNoteAccess(ancestorNoteId, req, res))) { + if (!checkNoteAccess(ancestorNoteId, req, res)) { return; }