chore: render section instead of throw

This commit is contained in:
Roman Hotsiy 2018-09-14 09:55:02 +03:00
parent cbc9eab00a
commit cb79271ae4
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -37,8 +37,6 @@ export class ContentItem extends React.Component<ContentItemProps> {
content = null; content = null;
break; break;
case 'tag': case 'tag':
content = <SectionItem {...this.props} />;
break;
case 'section': case 'section':
content = <SectionItem {...this.props} />; content = <SectionItem {...this.props} />;
break; break;
@ -46,7 +44,7 @@ export class ContentItem extends React.Component<ContentItemProps> {
content = <OperationItem item={item as any} />; content = <OperationItem item={item as any} />;
break; break;
default: default:
throw new Error('Unknown item type'); content = <SectionItem {...this.props} />;
} }
return ( return (