diff --git a/js/utils/profileMedia.js b/js/utils/profileMedia.js index 07cb2dfd..4de331ed 100644 --- a/js/utils/profileMedia.js +++ b/js/utils/profileMedia.js @@ -46,6 +46,10 @@ export function sanitizeProfileMediaUrl(value) { return trimmed; } + if (trimmed === "images/robot.png") { + return ""; + } + if (/^ipfs:\/\//i.test(trimmed)) { return normalizeIpfsGatewayUrl(trimmed); } diff --git a/js/webtorrent.js b/js/webtorrent.js index 84dbaf38..dce6785c 100644 --- a/js/webtorrent.js +++ b/js/webtorrent.js @@ -873,6 +873,11 @@ export class TorrentClient { emit("torrent-stream-start", { magnet: magnetURI }); // 1) Make sure we have a WebTorrent client and a valid SW registration. const initResult = await this.init(); + + if (!this.client) { + throw new Error("Client destroyed during initialization"); + } + const serviceWorkerReady = !!(initResult?.serviceWorkerReady && this.swRegistration);