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 8 commits into
base: next
Choose a base branch
from
4 changes: 4 additions & 0 deletions code/lib/manager-api/src/lib/stories.ts
Expand Up @@ -193,6 +193,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