diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 08703fcf542a4b..c5dd24e1013c61 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1600,11 +1600,7 @@ void GetAddrInfo(const FunctionCallbackInfo& args) { UNREACHABLE("bad address family"); } - Local order; - if (!args[4]->ToUint32(env->context()).ToLocal(&order)) { - THROW_ERR_INVALID_ARG_VALUE(env, "bad order"); - return; - } + Local order = args[4].As(); auto req_wrap = std::make_unique(env, req_wrap_obj,