hiding tag icon when no tags selected

This commit is contained in:
Jack 2020-06-12 18:13:40 +01:00
parent 7245ab64b0
commit 8fee706eee

View file

@ -131,7 +131,11 @@ function updateActiveTags(){
tagsString += $(tag).children('.title').text() + ', ';
}
})
$(".pageTest #tagNotice").html(`<i class="fas fa-tag"></i>${tagsString.substring(0, tagsString.length - 2)}`);
if(tagsString !== ""){
$(".pageTest #tagNotice").html(`<i class="fas fa-tag"></i>${tagsString.substring(0, tagsString.length - 2)}`);
}else{
$(".pageTest #tagNotice").empty();
}
}
//smooth caret