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 !== ''.
This commit is contained in:
parent
eed57e7999
commit
f230fd4d04
|
@ -763,12 +763,12 @@ export function setStartMutedPolicy(
|
||||||
* @param {string} subject - The new subject.
|
* @param {string} subject - The new subject.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
export function setSubject(subject: string = '') {
|
export function setSubject(subject: string) {
|
||||||
return (dispatch: Dispatch<any>, getState: Function) => {
|
return (dispatch: Dispatch<any>, getState: Function) => {
|
||||||
const { conference } = getState()['features/base/conference'];
|
const { conference } = getState()['features/base/conference'];
|
||||||
|
|
||||||
if (conference) {
|
if (conference) {
|
||||||
conference.setSubject(subject);
|
conference.setSubject(subject || '');
|
||||||
} else {
|
} else {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: SET_PENDING_SUBJECT_CHANGE,
|
type: SET_PENDING_SUBJECT_CHANGE,
|
||||||
|
|
Loading…
Reference in New Issue