trim tags
This commit is contained in:
@ -118,7 +118,7 @@ const flash = ({ type, msg }) => {
|
||||
let tt;
|
||||
input.addEventListener("keydown", async e => {
|
||||
if(e.key === "Enter") {
|
||||
const tmptag = input.value;
|
||||
const tmptag = input.value?.trim();
|
||||
if(tags.includes(tmptag))
|
||||
return alert("tag already exists");
|
||||
const res = await addTag(postid, tmptag);
|
||||
|
Reference in New Issue
Block a user