Limit the use of the same shortcut name and url when adding a shortcut with test cases

Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
AmbrishRamachandiran
2023-07-31 10:05:31 +05:30
parent 38b272d1f4
commit 900dbea7f7
+1 -1
View File
@@ -74,7 +74,7 @@ export const ShortcutForm = ({
};
const urlIsUnique = async (url: string) => {
if (shortcutData.get().some(shortcutUrl => shortcutUrl.url === url))
if (shortcutData.some(shortcutUrl => shortcutUrl.url === url))
return 'A shortcut with this url already exists';
return true;
};