From 58623f827428baa755de3d0fa266f972bd38327f Mon Sep 17 00:00:00 2001 From: Shazib Hussain Date: Thu, 9 Nov 2023 23:19:04 +0000 Subject: [PATCH] Fix linter warnings --- packages/loot-core/src/server/db/index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/loot-core/src/server/db/index.ts b/packages/loot-core/src/server/db/index.ts index 6a2d2654094..59e96e1a43a 100644 --- a/packages/loot-core/src/server/db/index.ts +++ b/packages/loot-core/src/server/db/index.ts @@ -347,9 +347,14 @@ export async function insertCategory( let id_; await batchMessages(async () => { // Dont allow duplicated names in groups - const existingCatInGroup = await first( `SELECT id FROM categories WHERE cat_group = ? and name = ? LIMIT 1`, [category.cat_group, category.name]); + const existingCatInGroup = await first( + `SELECT id FROM categories WHERE cat_group = ? and name = ? LIMIT 1`, + [category.cat_group, category.name], + ); if (existingCatInGroup) { - throw new Error(`Category '${category.name}' already exists in group '${category.cat_group}'`); + throw new Error( + `Category ‘${category.name}’ already exists in group ‘${category.cat_group}’`, + ); } if (atEnd) {