We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f35e1 commit d8be554Copy full SHA for d8be554
src/gatsby/onPostBuild.ts
@@ -72,6 +72,11 @@ const parsePathSlug = (slug: string) => {
72
const pathMatch = slug.match(
73
/^\/(?<platform>[^/]+)\/performance-onboarding\/(?<sub_platform>[^/]+)\/(?<step>[^/]+)\/$/
74
);
75
+
76
+ if(!pathMatch) {
77
+ throw new Error(`Unable to parse performance onboarding from slug: ${slug}`);
78
+ }
79
80
const { platform, sub_platform } = pathMatch.groups;
81
const step = String(pathMatch.groups.step).replace(/\./g, "-");
82
const sub = platform === sub_platform ? `performance-onboarding-${step}` : `performance-onboarding-${sub_platform}-${step}`;
0 commit comments