Skip to content

Commit 84c485f

Browse files
committed
fix: prevent scheduleBuild from running when element is not connected
1 parent a9b4a82 commit 84c485f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/drive-picker/drive-picker-element.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ export class DrivePickerElement extends HTMLElement {
181181
}
182182

183183
attributeChangedCallback() {
184+
if (!this.isConnected) return;
185+
184186
this.scheduleBuild();
185187
}
186188

@@ -302,6 +304,8 @@ export class DrivePickerElement extends HTMLElement {
302304
subtree: true,
303305
attributes: true,
304306
});
307+
308+
this.scheduleBuild();
305309
}
306310

307311
private callbackToDispatchEvent(detail: google.picker.ResponseObject) {

0 commit comments

Comments
 (0)