DEV: prevents Firefox ESR tests to crash on ||= (#14758)

A follow up PR should investigate why `proposal-logical-assignment-operators` is not getting used here (test file?) but this should be enough to get things running.
This commit is contained in:
Joffrey JAFFEUX 2021-10-28 10:55:22 +02:00 committed by GitHub
parent ba3078e098
commit 9e19b22f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,8 +35,10 @@ export default function (helper) {
}
export function getChannelInfo(name) {
channels[name] ||= { count: 0, users: [], last_message_id: 0 };
return channels[name];
return (
channels[name] ||
(channels[name] = { count: 0, users: [], last_message_id: 0 })
);
}
export function joinChannel(name, user) {