diff options
author | 2022-11-09 22:45:02 -0800 | |
---|---|---|
committer | 2022-11-09 22:45:02 -0800 | |
commit | a858261832800f03c294d59365fde19d783c486d (patch) | |
tree | f4a6d67edcf70026f2cbc8ad15dddad5cc87a506 | |
parent | 9fccbf936455fd4f340547ba8aaabe43c5362917 (diff) | |
download | bun-a858261832800f03c294d59365fde19d783c486d.tar.gz bun-a858261832800f03c294d59365fde19d783c486d.tar.zst bun-a858261832800f03c294d59365fde19d783c486d.zip |
Clone the text
-rw-r--r-- | src/bun.js/api/html_rewriter.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/api/html_rewriter.zig b/src/bun.js/api/html_rewriter.zig index c570c4c5a..605323869 100644 --- a/src/bun.js/api/html_rewriter.zig +++ b/src/bun.js/api/html_rewriter.zig @@ -1090,7 +1090,7 @@ pub const TextChunk = struct { pub fn getText(this: *TextChunk, global: *JSGlobalObject) JSValue { if (this.text_chunk == null) return JSC.JSValue.jsUndefined(); - return ZigString.init(this.text_chunk.?.getContent().slice()).withEncoding().toValue(global); + return ZigString.init(this.text_chunk.?.getContent().slice()).withEncoding().toValueGC(global); } pub fn removed(this: *TextChunk, _: *JSGlobalObject) JSValue { |