diff --git a/napi-inl.h b/napi-inl.h index ff84d882e..babbebd28 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -3588,11 +3588,11 @@ inline FunctionReference& AsyncWorker::Callback() { } inline void AsyncWorker::OnOK() { - _callback.MakeCallback(_receiver.Value(), std::initializer_list{}); + _callback.Call(_receiver.Value(), std::initializer_list{}); } inline void AsyncWorker::OnError(const Error& e) { - _callback.MakeCallback(_receiver.Value(), std::initializer_list{ e.Value() }); + _callback.Call(_receiver.Value(), std::initializer_list{ e.Value() }); } inline void AsyncWorker::SetError(const std::string& error) {