From af8452ddb26f58f2b5a4b8d9b07a4589099e90c9 Mon Sep 17 00:00:00 2001 From: Antonio Stoilkov Date: Wed, 8 Jan 2025 16:47:45 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20`ii(new=20URL(url))`=20doesn't?= =?UTF-8?q?=20work?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playground/playground.ts | 5 +++++ src/inspect/consoleInspect.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/playground/playground.ts b/playground/playground.ts index 6ff54d6..ed11815 100644 --- a/playground/playground.ts +++ b/playground/playground.ts @@ -404,3 +404,8 @@ examples.make(() => { // ii.defaults.pre = undefined; }); + +// 🐛 ii(new URL()) isn't printed at all +examples.make(() => { + ii(new URL("https://example.com")); +}); diff --git a/src/inspect/consoleInspect.ts b/src/inspect/consoleInspect.ts index 233e5db..def6b62 100644 --- a/src/inspect/consoleInspect.ts +++ b/src/inspect/consoleInspect.ts @@ -118,6 +118,8 @@ function inspect( ).spans, }), ]; + } else { + spans.push(...inspection.spans); } } else { spans.push(...inspection.spans);