You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
just use the one if statement
This commit is contained in:
@@ -307,9 +307,7 @@ function waitForUserWidget(widgetId) {
|
||||
}
|
||||
|
||||
function onAccountData(ev) {
|
||||
if (ev.getType() != 'm.widgets') return;
|
||||
|
||||
if (ev.getContent() && ev.getContent()[widgetId] !== undefined) {
|
||||
if (ev.getType() === 'm.widgets' && ev.getContent() && ev.getContent()[widgetId] !== undefined) {
|
||||
MatrixClientPeg.get().removeListener('accountData', onAccountData);
|
||||
clearTimeout(timerId);
|
||||
resolve();
|
||||
|
||||
Reference in New Issue
Block a user