message: chore: a little more refactoring here if it's undefined
diff: @@ -241,10 +241,12 @@ export async function createRouter(
  })),
  output: template.spec.output ?? {},
  parameters: values,
  - user: {
  + user: userEntity
  + ? {
  entity: userEntity as UserEntity,
  ref: userEntityRef,
  - },
  + }
  + : undefined,
  templateInfo: {
  entityRef: stringifyEntityRef({
  kind,
  