-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Problem
The plugin injects gptAds to the application and the GptAd component adds to the $gptAds.slots array inside the mounted hook:
this.$gptAds.slots.push(adSlot);The beforeDestroy() hook uses googletag.destroySlots method as it should.
const destroyed = googletag.destroySlots([this.adSlot]);However there is no cleanup of this.$gptAds.slots when the component is removed, thus keeping the adSlot in memory, event after the component is destroyed.
Is this intentional ?
Possible solution
I think the adSlot should be also removed from this.$gptAds.slots.
For example:
const destroyed = googletag.destroySlots([this.adSlot]);
this.$gptAds.slots = this.$gptAds.slots.filter(adSlot => adSlot != this.adSlot);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels