Skip to content

Commit

Permalink
fix: component name lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Sep 8, 2020
1 parent b65b1a4 commit cc14aa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/store/src/state/context/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export const useComponents = ({
}
return { ...acc, ...comps };
}
const name =
getComponentName(comp) || Object.keys(doc.componentsLookup)[0];
const keys = Object.keys(doc.componentsLookup);
const name = keys.length === 1 ? keys[0] : getComponentName(comp);
if (name) {
const component = getComponent(name);
if (component) {
Expand Down
2 changes: 1 addition & 1 deletion examples/docz-migration/docs/playground.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: Playground
menu: Components
---

import { Playground } from '@component-controls/blocks';
import { Playground, Story } from '@component-controls/blocks';
import { Button } from '../src/components/Button'

# Button
Expand Down

0 comments on commit cc14aa3

Please sign in to comment.