Skip to content

Commit 13a6bc2

Browse files
committed
refactor: simplify customPages component assignment in ConfigValidator
1 parent 4e2c657 commit 13a6bc2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adminforth/modules/configValidator.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,14 @@ export default class ConfigValidator implements IConfigValidator {
159159
if (!customization.customPages) {
160160
customization.customPages = [];
161161
}
162-
customization.customPages.forEach((page, i) => {
162+
customization.customPages.forEach((page) => {
163163
page.component = this.validateComponent(page.component, errors);
164164
const meta = page.component.meta || {};
165165
if (meta.sidebarAndHeader === undefined) {
166166
meta.sidebarAndHeader = meta.customLayout === true ? 'none' : 'default';
167167
}
168168
delete meta.customLayout;
169169
page.component.meta = meta;
170-
customization.customPages[i].component = page.component;
171170
});
172171

173172
if (!customization.brandName) { //} === undefined) {

0 commit comments

Comments
 (0)