fix: prevent loading external resources twice

This commit is contained in:
Chubby Granny Chaser 2024-12-02 19:37:32 +00:00
parent e9fddd2456
commit de36965017
No known key found for this signature in database

View File

@ -137,7 +137,10 @@ export function App() {
}
})
.finally(() => {
if (document.getElementById("external-resources")) return;
const $script = document.createElement("script");
$script.id = "external-resources";
$script.src = `${import.meta.env.RENDERER_VITE_EXTERNAL_RESOURCES_URL}?t=${Date.now()}`;
document.head.appendChild($script);
});