stopping breakpoint functions if ads are disabled or not initialised

This commit is contained in:
Miodec 2023-05-17 15:11:41 +02:00
parent 1d7acdfc20
commit 5be6321a96

View file

@ -104,6 +104,7 @@ function updateBreakpoint(noReinstate = false): void {
widerThanBreakpoint = false;
}
if (noReinstate) return;
if (Config.ads === "off" || !initialised) return;
if (beforeUpdate !== widerThanBreakpoint) {
if (choice === "eg") {
EG.reinstate();
@ -123,6 +124,7 @@ function updateBreakpoint2(noReinstate = false): void {
widerThanBreakpoint2 = false;
}
if (noReinstate) return;
if (Config.ads === "off" || !initialised) return;
if (beforeUpdate !== widerThanBreakpoint2) {
PW.reinstate();
}