fix(content-docs): improve sidebar shorthand normalization error message (#6745)

This commit is contained in:
Joshua Chen 2022-02-23 20:03:58 +08:00 committed by GitHub
parent 9562a5d203
commit 2d93750caf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 74 additions and 25 deletions

View file

@ -26,7 +26,7 @@ import type {DocMetadataBase, DocNavLink} from '../types';
export function isCategoriesShorthand(
item: SidebarItemConfig,
): item is SidebarCategoriesShorthand {
return typeof item !== 'string' && !item.type;
return typeof item === 'object' && !item.type;
}
export function transformSidebarItems(