Skip to content

Commit 3798ffc

Browse files
skwowetcursoragent
andcommitted
fix: resolve frontend lint errors in project groups perf
Replace for-of middleware loop with sequential reduce and remove extra blank line. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8eaf5f9 commit 3798ffc

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

frontend/src/modules/lf/segments/store/actions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const isAdminOnly = () => {
1414
return roles.value.includes(LfRole.projectAdmin);
1515
};
1616

17-
1817
export default {
1918
// Project Groups
2019
listProjectGroups({

frontend/src/router/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ export const createRouter = () => {
8585
store,
8686
};
8787

88-
for (const middleware of middlewareArray) {
89-
// eslint-disable-next-line no-await-in-loop
90-
await middleware(context);
91-
}
88+
await middlewareArray.reduce(
89+
(promise, middleware) => promise.then(() => middleware(context)),
90+
Promise.resolve(),
91+
);
9292

9393
// Redirect to project group landing pages if routes that require a selected project group
9494
// And no project group is selected

0 commit comments

Comments
 (0)