From 5b2cbc5bf18f0e254fe1e3917b77595f27ff144e Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 9 Apr 2023 00:46:30 +0800 Subject: [PATCH] Fix hashtag shortcut added check --- src/pages/hashtag.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/hashtag.jsx b/src/pages/hashtag.jsx index 0d46d1af..a4db5bd6 100644 --- a/src/pages/hashtag.jsx +++ b/src/pages/hashtag.jsx @@ -260,6 +260,7 @@ function Hashtags(props) { const shortcut = { type: 'hashtag', hashtag: hashtags.join(' '), + instance, }; // Check if already exists const exists = states.shortcuts.some( @@ -272,7 +273,8 @@ function Hashtags(props) { shortcut.hashtag .split(/[\s+]+/) .sort() - .join(' '), + .join(' ') && + (s.instance ? s.instance === shortcut.instance : true), ); if (exists) { alert('This shortcut already exists');