Fix encoding of index.html

This commit is contained in:
Alex Gleason committed 2025-09-13 22:27:25 -05:00
1 parent 1938c145db
commit 7ad72f6ff8
1 file changed
+3 -2
+3 -2
View File
@@ -187,10 +187,11 @@ class FetchClient {
throw new Error(`Unexpected Content-Type: ${response.headers["Content-Type"]}`);
}
const decoded = atob(response.body);
const bytes = new Uint8Array(atob(response.body).split('').map(c => c.charCodeAt(0)));
const text = new TextDecoder().decode(bytes);
// Replace current document with the site index content
this.replaceDocument(decoded);
this.replaceDocument(text);
} catch (error) {
this.showError("Failed to load site index", error);
}