Skip to content

Commit

Permalink
fix: some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio committed Oct 14, 2024
1 parent 05d3f77 commit 30120de
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/next/src/data/server/addHookData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export function addHookData<P extends AddHookDataBaseProps>(
},
themeJSON,
fallback,
__headstartwp_site: mainQuery?.hostOrSlug ?? validHookStates?.[0]?.hostOrSlug,
__headstartwp_site: mainQuery?.hostOrSlug ?? validHookStates?.[0]?.hostOrSlug ?? null,
},
} satisfies
| GetStaticPropsResult<AddHookDataProps & P>
Expand Down
12 changes: 7 additions & 5 deletions projects/wp-multisite-nextjs/src/pages/_sites/[site]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ export const getStaticPaths = async () => {
const { sites } = getHeadlessConfig();

return {
paths: sites.map((site) => ({
params: {
site: site?.slug ?? site.host,
},
})),
paths: sites
.filter((site) => site.slug !== 'site1')
.map((site) => ({
params: {
site: site?.slug ?? site.host,
},
})),
fallback: true,
};
};
Expand Down

0 comments on commit 30120de

Please sign in to comment.