From ca0aeea3427591f3f76161b5b2c8d52b791a5501 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Fri, 12 Sep 2025 10:23:20 +0200 Subject: [PATCH] chore: code-review comments Signed-off-by: benjdlambert --- plugins/scaffolder-backend/src/service/router.test.ts | 2 +- plugins/scaffolder-backend/src/service/router.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/scaffolder-backend/src/service/router.test.ts b/plugins/scaffolder-backend/src/service/router.test.ts index 60fcce0739..16a6000224 100644 --- a/plugins/scaffolder-backend/src/service/router.test.ts +++ b/plugins/scaffolder-backend/src/service/router.test.ts @@ -280,7 +280,7 @@ describe('scaffolder router', () => { expect(response.body.length).toBe(2); }); - it('should include actiosn from the remote actions registry', async () => { + it('should include actions from the remote actions registry', async () => { const mockActionsRegistry = actionsRegistryServiceMock(); mockActionsRegistry.register({ name: 'my-demo-action', diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index a48bcb46b0..2a0792346d 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -133,7 +133,7 @@ import { import { TaskFilters } from '@backstage/plugin-scaffolder-node'; import { ActionsService } from '@backstage/backend-plugin-api/alpha'; -import { isObject } from 'lodash'; +import { isPlainObject } from 'lodash'; /** * RouterOptions @@ -335,8 +335,8 @@ export async function createRouter( credentials: await ctx.getInitiatorCredentials(), }); - if (isObject(output)) { - for (const [key, value] of Object.entries(output)) { + if (isPlainObject(output)) { + for (const [key, value] of Object.entries(output as JsonObject)) { ctx.output(key as keyof typeof output, value); } }