diff --git a/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts b/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts index 206ab96194..e0da88509d 100644 --- a/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts +++ b/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts @@ -482,7 +482,9 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) { const network = (ev.currentTarget as any).network as ThreadNetwork; const router = (ev.currentTarget as any).router as ThreadRouter; const otbr = (ev.currentTarget as any).otbr as OTBRInfo; - const index = Number(ev.detail.index); + const index = network.dataset + ? Number(ev.detail.index) + : Number(ev.detail.index) + 1; switch (index) { case 0: this._setPreferredBorderAgent(network.dataset!, router);