Skip to content

Commit 9120ac3

Browse files
author
Steven Orvell
committed
Avoid awaiting a null result
1 parent 899a539 commit 9120ac3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/decorators.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ export function asyncQuery(selector: string) {
259259
await this.updateComplete;
260260
const el = this.renderRoot.querySelector(selector);
261261
// if this is a LitElement, then await updateComplete
262-
await (el && (el as LitElement).updateComplete);
262+
if (el) {
263+
await (el as LitElement).updateComplete;
264+
}
263265
return el;
264266
},
265267
enumerable: true,

0 commit comments

Comments
 (0)