destroy ads properly

This commit is contained in:
evanpelle
2026-02-03 19:52:07 -08:00
parent 286b31f403
commit d358ef79de
3 changed files with 17 additions and 0 deletions
@@ -71,6 +71,12 @@ export class InGameHeaderAd extends LitElement implements Layer {
private hideHeaderAd(): void {
this.shouldShow = false;
this.adLoaded = false;
try {
window.ramp.destroyUnits(HEADER_AD_TYPE);
console.log("successfully destroyed in game header ad");
} catch (e) {
console.error("error destroying in game header ad", e);
}
this.requestUpdate();
}