Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 5b78104

Browse files
committed
just use the one if statement
1 parent 7bfe84f commit 5b78104

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ScalarMessaging.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,7 @@ function waitForUserWidget(widgetId) {
307307
}
308308

309309
function onAccountData(ev) {
310-
if (ev.getType() != 'm.widgets') return;
311-
312-
if (ev.getContent() && ev.getContent()[widgetId] !== undefined) {
310+
if (ev.getType() === 'm.widgets' && ev.getContent() && ev.getContent()[widgetId] !== undefined) {
313311
MatrixClientPeg.get().removeListener('accountData', onAccountData);
314312
clearTimeout(timerId);
315313
resolve();

0 commit comments

Comments
 (0)