diff --git a/lib/client-api/src/args.ts b/lib/client-api/src/args.ts index f09e3bf91910..cc4e4ea8a37c 100644 --- a/lib/client-api/src/args.ts +++ b/lib/client-api/src/args.ts @@ -3,13 +3,13 @@ import { once } from '@storybook/client-logger'; import isPlainObject from 'lodash/isPlainObject'; import dedent from 'ts-dedent'; -type ValueType = { name: string; value?: ObjectValueType | ValueType }; +type ValueType = { name?: string; summary?: string; value?: ObjectValueType | ValueType }; type ObjectValueType = Record; const INCOMPATIBLE = Symbol('incompatible'); const map = (arg: unknown, type: ValueType): any => { if (arg === undefined || arg === null || !type) return arg; - switch (type.name) { + switch (type.name || type.summary) { case 'string': return String(arg); case 'enum':