summaryrefslogtreecommitdiff
path: root/js/console.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/console.ts')
-rw-r--r--js/console.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/console.ts b/js/console.ts
index 3d2d65909..bb597d9f2 100644
--- a/js/console.ts
+++ b/js/console.ts
@@ -63,9 +63,12 @@ function createIterableString(
ctx.add(value);
const entries: string[] = [];
- for (const el of value) {
- entries.push(config.entryHandler(el, ctx, level + 1, maxLevel));
- }
+ // In cases e.g. Uint8Array.prototype
+ try {
+ for (const el of value) {
+ entries.push(config.entryHandler(el, ctx, level + 1, maxLevel));
+ }
+ } catch (e) {}
ctx.delete(value);
const iPrefix = `${config.displayName ? config.displayName + " " : ""}`;
const iContent = entries.length === 0 ? "" : ` ${entries.join(", ")} `;