aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/bindings/helpers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/bindings/helpers.h b/src/bun.js/bindings/helpers.h
index 5b5fb5fd2..ad02b2dfa 100644
--- a/src/bun.js/bindings/helpers.h
+++ b/src/bun.js/bindings/helpers.h
@@ -306,7 +306,7 @@ static JSC::JSValue getErrorInstance(const ZigString* str, JSC__JSGlobalObject*
{
JSC::VM& vm = globalObject->vm();
- JSC::JSObject* result = JSC::createError(globalObject, toString(*str));
+ JSC::JSObject* result = JSC::createError(globalObject, toStringCopy(*str));
JSC::EnsureStillAliveScope ensureAlive(result);
return JSC::JSValue(result);