Use fetch to get images without adding them to the DOM straight away

This commit is contained in:
ernstmul
2025-01-29 15:37:32 +01:00
parent bc35419051
commit f9bd24e3af
@@ -26,8 +26,12 @@
if (isCloud) {
regions = await sdk.forConsole.billing.listRegions();
regions.regions.forEach((region) => {
const img = new Image();
img.src = getFlagUrl(region.flag);
fetch(getFlagUrl(region.flag)).then((response) => {
if (!response.ok) {
return;
}
return response.blob();
});
});
}
});