mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 08:48:47 +01:00
Fix hashtag shortcut added check
This commit is contained in:
parent
7edf63d41b
commit
5b2cbc5bf1
1 changed files with 3 additions and 1 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue