Fix ad init not working on no tauri invoke
This commit is contained in:
parent
115acce80c
commit
d302795512
@ -73,17 +73,26 @@
|
||||
});
|
||||
|
||||
const hash = getCookie("modrinth-app-token");
|
||||
console.log(hash)
|
||||
console.log(hash);
|
||||
tude.setIdProfile({
|
||||
e: hash,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.__TAURI_INTERNALS__
|
||||
.invoke("plugin:ads|get_ads_personalization", {})
|
||||
.then(initAds)
|
||||
.catch(() => initAds(true));
|
||||
try {
|
||||
if (window.__TAURI_INTERNALS__) {
|
||||
window.__TAURI_INTERNALS__
|
||||
.invoke("plugin:ads|get_ads_personalization", {})
|
||||
.then(initAds)
|
||||
.catch(() => initAds(true));
|
||||
} else {
|
||||
initAds(true);
|
||||
}
|
||||
} catch (err) {
|
||||
initAds(true);
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
window.addEventListener(
|
||||
"message",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user