UX: lowercase tag name before checking it with topic title.

Tag names can contain uppercase letters if `force_lowercase_tags` site setting disabled.
This commit is contained in:
Vinoth Kannan 2020-08-23 21:09:51 +05:30
parent 66976baefa
commit 62f4fc728d

View File

@ -165,11 +165,11 @@ const Topic = RestModel.extend({
return tags; return tags;
} }
const title = this.title; const title = this.title.toLowerCase();
const newTags = []; const newTags = [];
tags.forEach(function(tag) { tags.forEach(function(tag) {
if (title.toLowerCase().indexOf(tag) === -1) { if (title.indexOf(tag.toLowerCase()) === -1) {
newTags.push(tag); newTags.push(tag);
} }
}); });