diff --git a/frontend/src/ts/controllers/ad-controller.ts b/frontend/src/ts/controllers/ad-controller.ts index 8a0c4a261..dd7ba99a6 100644 --- a/frontend/src/ts/controllers/ad-controller.ts +++ b/frontend/src/ts/controllers/ad-controller.ts @@ -133,34 +133,30 @@ export async function renderResult(): Promise { } //@ts-ignore if (window.egAps === undefined) return; - try { - if (widerThanBreakpoint) { - // $("#ad-result-wrapper").html(` - //
- //
- // `); - // if ($("#ad-result-wrapper").is(":empty")) { - //@ts-ignore - // window.egAps.render(["ad-result"]); - // } else { - //@ts-ignore - window.egAps.refreshAds(["ad-result"]); - // } - } else { - // $("#ad-result-small-wrapper").html(` - //
- //
- // `); - // if ($("#ad-result-small-wrapper").is(":empty")) { - //@ts-ignore - // window.egAps.render(["ad-result-small"]); - // } else { - //@ts-ignore - window.egAps.refreshAds(["ad-result-small"]); - // } - } - } catch (e) { - $("#ad-result-wrapper .iconAndText").addClass("withLeft"); + if (widerThanBreakpoint) { + // $("#ad-result-wrapper").html(` + //
+ //
+ // `); + // if ($("#ad-result-wrapper").is(":empty")) { + //@ts-ignore + // window.egAps.render(["ad-result"]); + // } else { + //@ts-ignore + window.egAps.refreshAds(["ad-result"]); + // } + } else { + // $("#ad-result-small-wrapper").html(` + //
+ //
+ // `); + // if ($("#ad-result-small-wrapper").is(":empty")) { + //@ts-ignore + // window.egAps.render(["ad-result-small"]); + // } else { + //@ts-ignore + window.egAps.refreshAds(["ad-result-small"]); + // } } } @@ -197,3 +193,9 @@ BannerEvent.subscribe(() => { $(document).ready(() => { updateBreakpoint(true); }); + +window.onerror = function (error): void { + if (typeof error === "string" && error.substring(0, 6) === "EG APS") { + $("#ad-result-wrapper .iconAndText").addClass("withLeft"); + } +};