fix(napi-derive-backend): always generate CallContext for constructor function
This commit is contained in:
parent
d08f9b03e0
commit
813d671d76
1 changed files with 11 additions and 10 deletions
|
@ -39,7 +39,8 @@ impl TryToTokens for NapiFn {
|
|||
}
|
||||
};
|
||||
|
||||
let function_call = if args_len == 0 && self.fn_self.is_none() {
|
||||
let function_call =
|
||||
if args_len == 0 && self.fn_self.is_none() && self.kind != FnKind::Constructor {
|
||||
quote! { #native_call }
|
||||
} else {
|
||||
quote! {
|
||||
|
|
Loading…
Reference in a new issue