fix: adding tag with a # adds an extra #

This commit is contained in:
ammarahm-ed
2021-01-14 15:00:12 +05:00
parent 7e45744604
commit 2b9e663831

View File

@@ -47,6 +47,10 @@ export const ActionSheetTagsSection = ({item, close}) => {
return;
}
if (tagToAdd.startsWith("#")) {
tagToAdd = tagToAdd.slice(1);
}
let tag = tagToAdd;
tag = tag.trim();
if (tag.includes(' ')) {
@@ -124,7 +128,7 @@ export const ActionSheetTagsSection = ({item, close}) => {
let _tags = db.tags.all;
prevQuery = query;
let _suggestions;
if (query) {
_suggestions = _tags.filter(
(t) =>