diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 4a66ce0a1f1018..a1f70a58e4bb03 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -477,7 +477,8 @@ void UDPWrap::DoSend(const FunctionCallbackInfo& args, int family) { // construct uv_buf_t array for (size_t i = 0; i < count; i++) { - Local chunk = chunks->Get(env->context(), i).ToLocalChecked(); + Local chunk; + if (!chunks->Get(env->context(), i).ToLocal(&chunk)) return; size_t length = Buffer::Length(chunk);