diff --git a/node-src/tasks/verify.ts b/node-src/tasks/verify.ts index 1df0299eb..5de5c4101 100644 --- a/node-src/tasks/verify.ts +++ b/node-src/tasks/verify.ts @@ -57,7 +57,7 @@ export const publishBuild = async (ctx: Context) => { id, input: { ...(onlyStoryFiles && { onlyStoryFiles }), - ...(onlyStoryNames && { onlyStoryNames: [onlyStoryNames] }), + ...(onlyStoryNames && { onlyStoryNames: [].concat(onlyStoryNames) }), ...(replacementBuildIds && { replacementBuildIds }), // GraphQL does not support union input types (yet), so we send an object // @see https://github.com/graphql/graphql-spec/issues/488 diff --git a/node-src/ui/tasks/verify.ts b/node-src/ui/tasks/verify.ts index 95fb8a27a..6226a9e82 100644 --- a/node-src/ui/tasks/verify.ts +++ b/node-src/ui/tasks/verify.ts @@ -38,11 +38,11 @@ export const runOnlyFiles = (ctx: Context) => ({ export const runOnlyNames = (ctx: Context) => ({ status: 'pending', title: 'Starting partial build', - output: ctx.options.onlyStoryNames - ? `Snapshots will be limited to stories matching ${ctx.options.onlyStoryNames - .map((v) => `'${v}'`) - .join(', ')}` - : `Snapshots will be limited to ${ctx.onlyStoryFiles?.length} story files affected by recent changes`, + output: + ctx.options.onlyStoryNames && + `Snapshots will be limited to stories matching ${ctx.options.onlyStoryNames + .map((v) => `'${v}'`) + .join(', ')}`, }); export const awaitingUpgrades = (ctx: Context, upgradeBuilds: { completedAt?: number }[]) => {