forked from DebaucheryLibrarian/traxxx
Fixed entity and tag restriction in campaign component.
This commit is contained in:
parent
84f833ac31
commit
f7d28a7f43
|
@ -57,11 +57,14 @@ function entityCampaign() {
|
|||
if (bannerCampaigns.length > 0) {
|
||||
const randomCampaign = bannerCampaigns[Math.floor(Math.random() * bannerCampaigns.length)];
|
||||
|
||||
this.campaign = randomCampaign;
|
||||
this.$emit('campaign', randomCampaign);
|
||||
|
||||
return randomCampaign;
|
||||
}
|
||||
|
||||
this.$emit('campaign', null);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -75,11 +78,14 @@ function tagCampaign() {
|
|||
banner,
|
||||
};
|
||||
|
||||
this.campaign = randomCampaign;
|
||||
this.$emit('campaign', randomCampaign);
|
||||
|
||||
return randomCampaign;
|
||||
}
|
||||
|
||||
this.$emit('campaign', null);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -95,10 +101,12 @@ async function genericCampaign() {
|
|||
async function mounted() {
|
||||
if (this.entity) {
|
||||
await this.entityCampaign();
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.tag) {
|
||||
await this.tagCampaign();
|
||||
return;
|
||||
}
|
||||
|
||||
await this.genericCampaign();
|
||||
|
|
Loading…
Reference in New Issue