Fix injected profile badges being removed

This commit is contained in:
Samuel Elliott 2018-04-27 16:12:29 +01:00
parent 504221ce28
commit ca7a7c1f91
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 3 additions and 1 deletions

View File

@ -225,6 +225,8 @@ export default class extends Module {
root.removeChild(root.firstChild);
}
if (root.classList.contains('bd-has-badge')) return;
const { userid } = root.dataset;
if (!userid) return;
@ -234,7 +236,7 @@ export default class extends Module {
VueInjector.inject(root, {
components: { BdBadge },
data: { c },
template: '<BdBadge :developer="c.developer" :webdev="c.webdev" :contributor="c.contributor" />',
template: '<BdBadge class="bd-has-badge" :developer="c.developer" :webdev="c.webdev" :contributor="c.contributor" />',
});
}