Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix : Update meta title error handling #26911

Open
wants to merge 10 commits into
base: next
Choose a base branch
from
4 changes: 4 additions & 0 deletions code/core/src/manager-api/lib/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ export const transformStoryIndexToStoriesHash = (
const parent = idx > 0 && list[idx - 1];
const id = sanitize(parent ? `${parent}-${name}` : name!);

if (name.trim() === '') {
throw new Error(dedent`Invalid title ${title} ending in slash.`);
}

if (parent === id) {
throw new Error(
dedent`
Expand Down