Skip to content

Commit 4e7b994

Browse files
committed
fixup!
1 parent 1b78460 commit 4e7b994

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

react/features/base/devices/middleware.web.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,16 @@ MiddlewareRegistry.register(store => next => action => {
176176
}
177177
break;
178178
}
179-
case UPDATE_DEVICE_LIST:
179+
case UPDATE_DEVICE_LIST: {
180+
const result = next(action);
181+
180182
logDevices(action.devices, 'Device list updated');
181183
if (areDeviceLabelsInitialized(store.getState())) {
182-
return _processPendingRequests(store, next, action);
184+
_processPendingRequests(store);
183185
}
184-
break;
186+
187+
return result;
188+
}
185189
case CHECK_AND_NOTIFY_FOR_NEW_DEVICE:
186190
_checkAndNotifyForNewDevice(store, action.newDevices, action.oldDevices);
187191
break;
@@ -196,20 +200,15 @@ MiddlewareRegistry.register(store => next => action => {
196200
*
197201
* @param {Store} store - The redux store in which the specified {@code action}
198202
* is being dispatched.
199-
* @param {Dispatch} next - The redux {@code dispatch} function to dispatch the
200-
* specified {@code action} to the specified {@code store}.
201-
* @param {Action} action - The redux action {@code CONFERENCE_JOINED} which is
202-
* being dispatched in the specified {@code store}.
203203
* @private
204-
* @returns {Object} The value returned by {@code next(action)}.
204+
* @returns {void}
205205
*/
206-
function _processPendingRequests({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
207-
const result = next(action);
206+
function _processPendingRequests({ dispatch, getState }: IStore) {
208207
const state = getState();
209208
const { pendingRequests } = state['features/base/devices'];
210209

211210
if (!pendingRequests || pendingRequests.length === 0) {
212-
return result;
211+
return;
213212
}
214213

215214
pendingRequests.forEach((request: any) => {
@@ -220,8 +219,6 @@ function _processPendingRequests({ dispatch, getState }: IStore, next: Function,
220219
request.responseCallback);
221220
});
222221
dispatch(removePendingDeviceRequests());
223-
224-
return result;
225222
}
226223

227224
/**

0 commit comments

Comments
 (0)