Skip to content

Commit

Permalink
Merge pull request #464 from G-Core/redirect-article-fix
Browse files Browse the repository at this point in the history
fix build issue
  • Loading branch information
IgorSinyak authored Oct 9, 2023
2 parents a881346 + bbda440 commit b42516a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scully/plugins/algolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const updateAlgoliaIndex = async (dom, options): Promise<JSDOM> => {
return dom;
}
try {
if (options.data.title !== 'metadata' && options.data.published && !options.data.redirect) {
if (options.data?.title !== 'metadata' && options.data?.published && !options.data?.redirect) {
const { window } = dom;
const { document } = window;
const mainTitle = document.querySelector('h1')?.innerHTML || '';
Expand Down
3 changes: 2 additions & 1 deletion scully/plugins/sitemap/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ export const sitemapPlugin = async (routes: Array<HandledRoute>): Promise<void>
const maps = {};

routes.forEach((route: HandledRoute) => {
console.log('route', route);
if (
route.data.redirect ||
route.data?.redirect ||
config.ignoredRoutes.includes(route.route) ||
config.ignoredRoutesPattern.some((regExp) => regExp.test(route.route))
) {
Expand Down

0 comments on commit b42516a

Please sign in to comment.