From 02b2cd2aed6f58c239298cc898c6e469bd20d7e3 Mon Sep 17 00:00:00 2001 From: Fareesh Vijayarangam Date: Sat, 25 Nov 2023 03:05:37 +0530 Subject: [PATCH] Fix maxItemText for maxItemCount === 1 Singular / Plural --- src/scripts/defaults.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/defaults.ts b/src/scripts/defaults.ts index c7dd57e..904a322 100644 --- a/src/scripts/defaults.ts +++ b/src/scripts/defaults.ts @@ -69,7 +69,7 @@ export const DEFAULT_CONFIG: Options = { uniqueItemText: 'Only unique values can be added', customAddItemText: 'Only values matching specific conditions can be added', addItemText: (value) => `Press Enter to add "${sanitise(value)}"`, - maxItemText: (maxItemCount) => `Only ${maxItemCount} ${maxItemCount == 1 'value' : 'values'} can be added`, + maxItemText: (maxItemCount) => `Only ${maxItemCount} ${maxItemCount === 1 'value' : 'values'} can be added`, valueComparer: (value1, value2) => value1 === value2, fuseOptions: { includeScore: true,