From 715be35764df183f473344a794a0aed6eeeb0eed Mon Sep 17 00:00:00 2001 From: Kerem Kat Date: Tue, 31 Oct 2023 06:05:32 +0000 Subject: 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 --- src/bun.js/bindings/JSDOMFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bun.js/bindings/JSDOMFile.cpp') 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 {}; } }; -- cgit v1.2.3