From f230fd4d0402441093ae66ebc444f4dc4cf51dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 18 Jun 2020 09:56:42 +0200 Subject: [PATCH] subject: avoid sending an extra empty subject update When setSubject is called too early we store it as pensing, but thanks to the default parameter value, if undefined is passed to the function we'll store the empty string. This will trigger a needless update because undefined !== ''. --- react/features/base/conference/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.js index 9043aa911..f844ed297 100644 --- a/react/features/base/conference/actions.js +++ b/react/features/base/conference/actions.js @@ -763,12 +763,12 @@ export function setStartMutedPolicy( * @param {string} subject - The new subject. * @returns {void} */ -export function setSubject(subject: string = '') { +export function setSubject(subject: string) { return (dispatch: Dispatch, getState: Function) => { const { conference } = getState()['features/base/conference']; if (conference) { - conference.setSubject(subject); + conference.setSubject(subject || ''); } else { dispatch({ type: SET_PENDING_SUBJECT_CHANGE,