diff options
author | 2023-10-31 06:05:32 +0000 | |
---|---|---|
committer | 2023-10-30 23:05:32 -0700 | |
commit | 715be35764df183f473344a794a0aed6eeeb0eed (patch) | |
tree | fc5f1cd60b9c5ba634062a5f96ad67e59d05f8f5 /src/bun.js/bindings/JSDOMFile.cpp | |
parent | e259056bd8966f38057f5f9962246503be7b4cb2 (diff) | |
download | bun-715be35764df183f473344a794a0aed6eeeb0eed.tar.gz bun-715be35764df183f473344a794a0aed6eeeb0eed.tar.zst bun-715be35764df183f473344a794a0aed6eeeb0eed.zip |
Fix 6281 (#6809)
* throw an error when `Script` is called without new
fix https://github.com/oven-sh/bun/issues/6281
* fix typo in `File` without constructor error
fix https://github.com/oven-sh/bun/issues/6281
Diffstat (limited to 'src/bun.js/bindings/JSDOMFile.cpp')
-rw-r--r-- | src/bun.js/bindings/JSDOMFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/bindings/JSDOMFile.cpp b/src/bun.js/bindings/JSDOMFile.cpp index 4e0e4bf48..37536729d 100644 --- a/src/bun.js/bindings/JSDOMFile.cpp +++ b/src/bun.js/bindings/JSDOMFile.cpp @@ -96,7 +96,7 @@ public: static EncodedJSValue call(JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame) { auto scope = DECLARE_THROW_SCOPE(lexicalGlobalObject->vm()); - throwTypeError(lexicalGlobalObject, scope, "Class constructor File cannot be invoked without 'new"_s); + throwTypeError(lexicalGlobalObject, scope, "Class constructor File cannot be invoked without 'new'"_s); return {}; } }; |