File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ Maybe<std::shared_ptr<DataQueue>> Stream::GetDataQueueFromSource(
225225 ASSIGN_OR_RETURN_UNWRAP (
226226 &dataQueueFeeder, value, Nothing<std::shared_ptr<DataQueue>>());
227227 std::shared_ptr<DataQueue> dataQueue = DataQueue::Create ();
228- dataQueue->append (DataQueue::CreateFeederEntry (dataQueueFeeder));
228+ dataQueue->append (std::move ( DataQueue::CreateFeederEntry (dataQueueFeeder) ));
229229 return Just (dataQueue);
230230 }
231231
@@ -1396,7 +1396,8 @@ JS_METHOD_IMPL(DataQueueFeeder::Submit) {
13961396 if (args[1 ]->IsBoolean () && args[1 ].As <v8::Boolean>()->Value ()) {
13971397 done = true ;
13981398 }
1399- if (!args[0 ].IsEmpty ()) {
1399+ if (!args[0 ].IsEmpty () &&
1400+ !args[0 ]->IsUndefined () && !args[0 ]->IsNull ()) {
14001401 CHECK_GT (feeder->pendingPulls_ .size (), 0 );
14011402 auto chunk = args[0 ];
14021403
@@ -1407,6 +1408,7 @@ JS_METHOD_IMPL(DataQueueFeeder::Submit) {
14071408 if (!chunk->IsTypedArray ()) {
14081409 THROW_ERR_INVALID_ARG_TYPE (
14091410 env, " Invalid data must be Arraybuffer or TypedArray" );
1411+ return ;
14101412 }
14111413 Local<TypedArray> typedArray = chunk.As <TypedArray>();
14121414 // now we create a copy
You can’t perform that action at this time.
0 commit comments