Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function calls with ?. throw TypeError #385

Closed
losas opened this issue May 1, 2022 · 1 comment
Closed

function calls with ?. throw TypeError #385

losas opened this issue May 1, 2022 · 1 comment
Labels

Comments

@losas
Copy link

losas commented May 1, 2022

Related to #350

console.log(adventurer.someNonExistentMethod?.());
/*
expected output: undefined
goja: 
   panic: TypeError: Object has no member 'someNonExistentMethod' at ...
*/
@dop251 dop251 closed this as completed in e1eca0b May 1, 2022
@dop251 dop251 added the bug label May 1, 2022
@dop251
Copy link
Owner

dop251 commented May 1, 2022

Thanks for reporting!

Gabri3l pushed a commit to mongodb-forks/goja that referenced this issue Sep 1, 2022
Gabri3l added a commit to mongodb-forks/goja that referenced this issue Mar 15, 2023
* Fixed panic in newArrayFromIter when the iterator is already closed. Fixes dop251#375
* Fixed panic when parsing invalid object property keys. Fixes dop251#376.
* Fixed accidental shadowing in the else branches of type assertion
* Fixed defineProperty("length") for arrays. Improved detection of non-standard array configurations. Upgraded tc39 tests.
* Return true values of struct fields or reflect slice elements, rather than pointers to them. Closes dop251#378.
* Upgraded dependencies. Closes dop251#380.
* Implemented exponentiation expressions. Closes dop251#381.
* Enabled tests that use ** operator. Some array fixes as a result.
* Implemented nullish coalescing operator (??). Closes dop251#382.
* Implemented `{Array,String,%TypedArray%}.prototype.at` (dop251#384)e7c2872c8)
* Fixed callee expressions in optional chains. Fixes dop251#385.
* Do not use fmt.Sprintf() for plain error strings. Fixes dop251#388.
* Implemented 'copy-on-change' mechanism for inner compound values. Fixes dop251#403.
* Fixed objectGoReflect equality. See dop251#403
* Don't clear interrupt until the stack is empty (dop251#405)
* test: skip Promise based tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants