Fix race between initClient and disconnectedCallback

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-17 11:32:33 +04:00
parent bc766ae5c9
commit 0ab448691d

View File

@@ -116,6 +116,9 @@ export class ProboCookieBannerRoot extends ProboElement implements ProboRootElem
return;
}
// Element was disconnected while load() was in-flight.
if (!this._client) return;
this._config = this._client.config;
this._draft = this.buildDraft(this._config);