Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JReinhold committed Mar 16, 2023
1 parent ecd89c9 commit 4e118cd
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type {
} from '@storybook/types';
import type { Channel } from '@storybook/channels';

import dedent from 'ts-dedent';
import type { StoryStore } from '../../store';
import { prepareMeta } from '../../store';
import type { DocsContextProps } from './DocsContextProps';
Expand Down Expand Up @@ -162,14 +163,12 @@ export class DocsContext<TRenderer extends Renderer> implements DocsContextProps

if (validTypes.length && !validTypes.includes(resolved.type as TType)) {
const prettyType = resolved.type === 'component' ? 'component or unknown' : resolved.type;
throw new Error(
`Invalid value passed to the 'of' prop. The value was resolved to a '${prettyType}' type but the only types for this block are: ${validTypes.join(
', '
)}.
- Did you pass a component to the 'of' prop when the block only supports a story or a meta?
- ... or vice versa?
- Did you pass a story, CSF file or meta to the 'of' prop that is not indexed, ie. is not targeted by the 'stories' globs in the main configuration?`
);
throw new Error(dedent`Invalid value passed to the 'of' prop. The value was resolved to a '${prettyType}' type but the only types for this block are: ${validTypes.join(
', '
)}.
- Did you pass a component to the 'of' prop when the block only supports a story or a meta?
- ... or vice versa?
- Did you pass a story, CSF file or meta to the 'of' prop that is not indexed, ie. is not targeted by the 'stories' globs in the main configuration?`);
}

switch (resolved.type) {
Expand Down

0 comments on commit 4e118cd

Please sign in to comment.