async function fetchIconPng(iconUrl: string) {
return await fetch(
- iconUrl
- .replace(/https?:\/\/localhost:\d+/g, getHttpBaseInternal())
- .replace(/https/, "http")
+ iconUrl.replace(/https?:\/\/localhost:\d+/g, getHttpBaseInternal())
)
.then(res => res.blob())
.then(blob => blob.arrayBuffer());