Skip to content

Commit 81ab259

Browse files
committed
Address comments
1 parent c0ab73e commit 81ab259

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/install-web/install-web-dialog.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,18 @@ export class ESPHomeInstallWebDialog extends LitElement {
6363

6464
@property() private _showLogs = false;
6565

66-
connectedCallback() {
66+
async connectedCallback() {
6767
super.connectedCallback();
6868

69-
// this._console won't be defined until after the first paint
70-
setTimeout(() => {
71-
this.stream?.pipeTo(
72-
new WritableStream({
73-
write: (chunk) => {
74-
this._console.addLine(chunk);
75-
},
76-
}),
77-
);
78-
});
69+
await this.updateComplete;
70+
71+
this.stream?.pipeTo(
72+
new WritableStream({
73+
write: (chunk) => {
74+
this._console.addLine(chunk);
75+
},
76+
}),
77+
);
7978
}
8079

8180
protected render() {
@@ -180,7 +179,7 @@ export class ESPHomeInstallWebDialog extends LitElement {
180179
<div class="icon">${icon}</div>
181180
${label}
182181
</div>
183-
${showClose || true
182+
${showClose
184183
? html`
185184
<mwc-button
186185
slot="primaryAction"

0 commit comments

Comments
 (0)