Skip to content

Commit 66752e9

Browse files
authored
Fix init
1 parent b97efd9 commit 66752e9

File tree

2 files changed

+204
-155
lines changed

2 files changed

+204
-155
lines changed

Build/index.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,19 @@ <h1>HTMLChat</h1>
259259
<!-- JavaScript -->
260260
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
261261
<script>
262-
eruda.init();
262+
// Guard eruda initialization so missing CDN won't throw
263+
(function() {
264+
try {
265+
if (window.eruda && typeof window.eruda.init === 'function') {
266+
window.eruda.init();
267+
} else {
268+
// eruda didn't load or not available - silently continue
269+
console.debug('eruda not available or blocked - skipping debug console init');
270+
}
271+
} catch (e) {
272+
console.warn('eruda.init() failed:', e);
273+
}
274+
})();
263275
</script>
264276
<script type="module" src="src/main.js"></script>
265277
</body>

0 commit comments

Comments
 (0)