mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
just use the one if statement
This commit is contained in:
parent
7bfe84f8be
commit
5b781043a5
1 changed files with 1 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue