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 = {
|
const shortcut = {
|
||||||
type: 'hashtag',
|
type: 'hashtag',
|
||||||
hashtag: hashtags.join(' '),
|
hashtag: hashtags.join(' '),
|
||||||
|
instance,
|
||||||
};
|
};
|
||||||
// Check if already exists
|
// Check if already exists
|
||||||
const exists = states.shortcuts.some(
|
const exists = states.shortcuts.some(
|
||||||
|
@ -272,7 +273,8 @@ function Hashtags(props) {
|
||||||
shortcut.hashtag
|
shortcut.hashtag
|
||||||
.split(/[\s+]+/)
|
.split(/[\s+]+/)
|
||||||
.sort()
|
.sort()
|
||||||
.join(' '),
|
.join(' ') &&
|
||||||
|
(s.instance ? s.instance === shortcut.instance : true),
|
||||||
);
|
);
|
||||||
if (exists) {
|
if (exists) {
|
||||||
alert('This shortcut already exists');
|
alert('This shortcut already exists');
|
||||||
|
|
Loading…
Add table
Reference in a new issue