Skip to content

Commit ad5eca8

Browse files
fix
1 parent 8bd6822 commit ad5eca8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

public/apps/app store.tapp/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,15 @@ async function loadApp(app, type) {
167167
break;
168168
case "Anura":
169169
case "tb-liq":
170-
const icn2 = await window.parent.tb.libcurl.fetch(`${currRepo.url.replace("manifest.json", "")}/apps/${app.package}/${app.icon}`);
170+
let icn2
171+
if (currRepo.url) {
172+
icn2 = await window.parent.tb.libcurl.fetch(`${currRepo.url.replace("manifest.json", "")}/apps/${app.package}/${app.icon}`);
173+
} else {
174+
icn2 = await window.parent.tb.libcurl.fetch(app.icon);
175+
}
176+
if (!icn2.ok) {
177+
icn2 = await window.parent.tb.libcurl.fetch("https://terbiumon.top/favicon.ico");
178+
}
171179
const blob2 = await icn2.blob();
172180
icnUrl = URL.createObjectURL(blob2);
173181
break;
@@ -449,7 +457,7 @@ async function addRepo() {
449457
const list = await window.parent.tb.libcurl.fetch(value.replace("manifest.json", "list.json"));
450458
if (list.ok) {
451459
repos.push({
452-
name: name || meta.name || "Unknown",
460+
name: meta.name || "Unknown",
453461
url: value,
454462
icon: "https://anura.pro/icon.png",
455463
});

0 commit comments

Comments
 (0)