Skip to content

Commit

Permalink
UI: Fix edge case where only one legacy separator is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jan 14, 2020
1 parent f8878b6 commit 57590d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/api/src/modules/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ const initStoriesApi = ({
if (typeof rootSeparator !== 'undefined' || typeof groupSeparator !== 'undefined') {
warnRemovingHierarchySeparators();
if (usingShowRoots) warnUsingHierarchySeparatorsAndShowRoots();
({ root, groups } = parseKind(kind, { rootSeparator, groupSeparator }));
({ root, groups } = parseKind(kind, {
rootSeparator: rootSeparator || '|',
groupSeparator: groupSeparator || /\/|\./,
}));

// 2. If the user hasn't passed separators, but is using | or . in kinds, use the old behaviour but warn
} else if (anyKindMatchesOldHierarchySeparators && !usingShowRoots) {
Expand Down

0 comments on commit 57590d9

Please sign in to comment.