Allow empty type reg (#2313)

This commit is contained in:
Jaco Greeff 2020-02-28 21:29:07 +01:00 committed by GitHub
parent 863d160da0
commit 12f39673bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -148,7 +148,7 @@ function Developer ({ className, onStatusChange }: Props): React.ReactElement<Pr
/>
<Button.Or />
<Button
isDisabled={!isTypesValid || !isJsonValid || typesHasNoEntries}
isDisabled={!isTypesValid || !isJsonValid}
isPrimary
onClick={_saveDeveloper}
label={t('Save')}

View File

@ -28,7 +28,7 @@ export interface TabItem {
interface Props extends BareProps {
basePath: string;
hidden?: string[];
hidden?: (string | boolean | undefined)[];
items: TabItem[];
isSequence?: boolean;
}
@ -69,10 +69,9 @@ export default function Tabs (props: Props): React.ReactElement<Props> {
className={classes('ui--Menu ui menu tabular', className)}
style={style}
>
{
items
.filter(({ name }): boolean => !hidden.includes(name))
.map(renderItem(props))
{items
.filter(({ name }): boolean => !hidden.includes(name))
.map(renderItem(props))
}
</div>
);