Skip to content

Commit 9d27663

Browse files
Copilothotlong
andcommitted
refactor: rename variable to viewName for clarity
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent e79f189 commit 9d27663

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/console/objectstack.shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ function mergeViewsIntoObjects(objects: any[], configs: any[]): any[] {
4141
if (!Array.isArray(config.views)) continue;
4242
for (const view of config.views) {
4343
if (!view.listViews) continue;
44-
for (const [key, listView] of Object.entries(view.listViews as Record<string, any>)) {
44+
for (const [viewName, listView] of Object.entries(view.listViews as Record<string, any>)) {
4545
const objectName = listView?.data?.object;
4646
if (!objectName) continue;
4747
if (!viewsByObject[objectName]) viewsByObject[objectName] = {};
48-
viewsByObject[objectName][key] = listView;
48+
viewsByObject[objectName][viewName] = listView;
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)