Fix expected argument count for Callable call errors

This commit is contained in:
Danil Alexeev 2023-09-29 19:19:46 +03:00
parent 19890614c6
commit aff767ef07
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
15 changed files with 70 additions and 77 deletions

View file

@ -289,7 +289,7 @@ Ref<JavaScriptObject> JavaScriptBridge::get_interface(const String &p_interface)
Variant JavaScriptBridge::_create_object_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 0;
r_error.expected = 1;
return Ref<JavaScriptObject>();
}
if (p_args[0]->get_type() != Variant::STRING) {