From 3cb79c8dbe869cd630d885b62ca7fca230829a04 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 7 Oct 2024 00:08:52 +0200 Subject: [PATCH] fix(account): Fix: updated cleanupViews method to correctly iterate over children. --- changelog.md | 5 +++++ ts/00_commitinfo_data.ts | 2 +- ts_web/00_commitinfo_data.ts | 2 +- ts_web/elements/account/content.ts | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 62b31ae..704360f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 2024-10-07 - 1.3.1 - fix(account) +Fix: updated cleanupViews method to correctly iterate over children. + +- Fixed the iteration over view container children by converting it to an array before removing children. This resolves potential errors due to incorrect for-loop execution on HTMLCollection. + ## 2024-10-06 - 1.3.0 - feat(account) Implement account and organization management features diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index d8b690a..d69f5ea 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@idp.global/idp.global', - version: '1.3.0', + version: '1.3.1', description: 'An identity provider software managing user authentications, registrations, and sessions.' } diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index d8b690a..d69f5ea 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@idp.global/idp.global', - version: '1.3.0', + version: '1.3.1', description: 'An identity provider software managing user authentications, registrations, and sessions.' } diff --git a/ts_web/elements/account/content.ts b/ts_web/elements/account/content.ts index cbcdb45..2d057d5 100644 --- a/ts_web/elements/account/content.ts +++ b/ts_web/elements/account/content.ts @@ -102,7 +102,7 @@ export class IdpAccountContent extends DeesElement { const viewcontainer: HTMLDivElement = this.shadowRoot.querySelector('.viewcontainer'); const cleanupViews = async () => { - for (const child of viewcontainer.children) { + for (const child of Array.from(viewcontainer.children)) { viewcontainer.removeChild(child); } };