File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -880,12 +880,15 @@ NAN_METHOD(AdminClient::NodeListGroups) {
880880 Nan::New (" matchConsumerGroupStates" ).ToLocalChecked ();
881881 bool is_match_states_set =
882882 Nan::Has (config, match_consumer_group_states_key).FromMaybe (false );
883- v8::Local<v8::Array> match_states_array;
883+ v8::Local<v8::Array> match_states_array = Nan::New<v8::Array>() ;
884884
885885 if (is_match_states_set) {
886886 match_states_array = GetParameter<v8::Local<v8::Array>>(
887887 config, " matchConsumerGroupStates" , match_states_array);
888- match_states = Conversion::Admin::FromV8GroupStateArray (match_states_array);
888+ if (match_states_array->Length ()) {
889+ match_states = Conversion::Admin::FromV8GroupStateArray (
890+ match_states_array);
891+ }
889892 }
890893
891894 // Queue the work.
Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ describe('Admin > listGroups', () => {
4848 await waitFor ( ( ) => consumer . assignment ( ) . length > 0 , ( ) => null , 1000 ) ;
4949
5050 await admin . connect ( ) ;
51- let listGroupsResult = await admin . listGroups ( ) ;
51+ let listGroupsResult = await admin . listGroups ( {
52+ matchConsumerGroupStates : undefined ,
53+ } ) ;
5254 expect ( listGroupsResult . errors ) . toEqual ( [ ] ) ;
5355 expect ( listGroupsResult . groups ) . toEqual (
5456 expect . arrayContaining ( [
You can’t perform that action at this time.
0 commit comments