Skip to content

Commit

Permalink
fix: isTabbedNavigationConfig checks for tabsV2 (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Jun 4, 2024
1 parent bb2cc94 commit 7546512
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/fdr-sdk/src/client/visitDbNavigationConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ function isVersionedNavigationConfig(config: DocsV1Db.NavigationConfig): config
export function isTabbedNavigationConfig(
config: DocsV1Db.UnversionedNavigationConfig,
): config is DocsV1Db.UnversionedTabbedNavigationConfig {
return Array.isArray((config as DocsV1Db.UnversionedTabbedNavigationConfig).tabs);
return (
Array.isArray((config as DocsV1Db.UnversionedTabbedNavigationConfig).tabs) ||
Array.isArray((config as DocsV1Db.UnversionedTabbedNavigationConfig).tabsV2)
);
}
5 changes: 4 additions & 1 deletion packages/fdr-sdk/src/client/visitWriteNavigationConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@ function isVersionedNavigationConfig(
export function isTabbedNavigationConfig(
config: DocsV1Write.UnversionedNavigationConfig,
): config is DocsV1Write.UnversionedTabbedNavigationConfig {
return Array.isArray((config as DocsV1Write.UnversionedTabbedNavigationConfig).tabs);
return (
Array.isArray((config as DocsV1Write.UnversionedTabbedNavigationConfig).tabs) ||
Array.isArray((config as DocsV1Write.UnversionedTabbedNavigationConfig).tabsV2)
);
}

0 comments on commit 7546512

Please sign in to comment.