aboutsummaryrefslogtreecommitdiff
path: root/src/deps/lol-html.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/deps/lol-html.zig')
-rw-r--r--src/deps/lol-html.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deps/lol-html.zig b/src/deps/lol-html.zig
index 9a9137856..12604d4e0 100644
--- a/src/deps/lol-html.zig
+++ b/src/deps/lol-html.zig
@@ -582,7 +582,7 @@ pub const HTMLString = extern struct {
pub fn toString(this: HTMLString) bun.String {
const bytes = this.slice();
- if (bun.strings.isAllASCII(bytes)) {
+ if (bytes.len > 0 and bun.strings.isAllASCII(bytes)) {
return bun.String.createExternal(bytes, true, @constCast(bytes.ptr), &deinit_external);
}
defer this.deinit();