diff options
author | 2022-09-21 18:52:24 -0700 | |
---|---|---|
committer | 2022-09-21 18:52:24 -0700 | |
commit | 16b1e84138056774684b5e769a20dabd787d069c (patch) | |
tree | aeb512d2d4395465998308cbc9474917c73c52f6 /src | |
parent | 100ce7b62ff1fe988699e96dc8c218e3efbd2474 (diff) | |
download | bun-16b1e84138056774684b5e769a20dabd787d069c.tar.gz bun-16b1e84138056774684b5e769a20dabd787d069c.tar.zst bun-16b1e84138056774684b5e769a20dabd787d069c.zip |
Fix crash when creating an empty array
Diffstat (limited to 'src')
-rw-r--r-- | src/bun.js/bindings/bindings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/bindings/bindings.cpp b/src/bun.js/bindings/bindings.cpp index 0cf2b2dcb..4b508591a 100644 --- a/src/bun.js/bindings/bindings.cpp +++ b/src/bun.js/bindings/bindings.cpp @@ -1208,7 +1208,7 @@ JSC__JSValue JSC__JSValue__createStringArray(JSC__JSGlobalObject* globalObject, JSC::VM& vm = globalObject->vm(); auto scope = DECLARE_THROW_SCOPE(vm); if (arg2 == 0) { - return JSC::JSValue::encode(JSC::JSArray::create(vm, 0)); + return JSC::JSValue::encode(JSC::constructEmptyArray(globalObject, nullptr)); } JSC::JSArray* array = nullptr; |