mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-19 12:56:02 +00:00
destroy ads properly
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user