Skip to content
Snippets Groups Projects
Commit 92c97795 authored by FarawayVision's avatar FarawayVision
Browse files

Alt costumes: avoid duplicating tags w/ alt costumes

parent fc1a9d4f
No related branches found
No related tags found
No related merge requests found
......@@ -379,16 +379,16 @@ Player.prototype.resetState = function () {
var tag = $elem.text();
var removed = $elem.attr('remove') || '';
if (removed.toLowerCase() === 'true') {
if (this.tags.indexOf(tag) > 0) {
if (this.tags.indexOf(tag) >= 0) {
this.tags.splice(this.tags.indexOf(tag), 1);
}
} else {
} else if (this.tags.indexOf(tag) < 0) {
this.tags.push(tag);
}
}.bind(this));
}
if (appearance.id) {
if (appearance.id && this.tags.indexOf(appearance.id) < 0) {
this.tags.push(appearance.id);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment