diff --git a/astro.config.ts b/astro.config.ts index b51dd4b5..410398e1 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -16,7 +16,8 @@ const getDevCssClassPrefix = (filename: string): string => { return filename .slice(filename.indexOf(PATH_PREFIX) + PATH_PREFIX.length) .replace('.module.scss', '') - .replace(/[/\\]/, '-') + .replace(/[/?\\]/, '-') + .replace('?', '-') } const devGenerateScopedName = (name: string, filename: string, css: string) => diff --git a/src/stores/zine/topAuthors.ts b/src/stores/zine/topAuthors.ts index 07e042b8..16529e69 100644 --- a/src/stores/zine/topAuthors.ts +++ b/src/stores/zine/topAuthors.ts @@ -15,11 +15,11 @@ export const useTopAuthorsStore = () => { return Object.keys(articlesByAuthor) .sort((authorSlug1, authorSlug2) => { const author1Rating = articlesByAuthor[authorSlug1].reduce( - (acc, article) => acc + article.stat.rating, + (acc, article) => acc + article.stat?.rating, 0 ) const author2Rating = articlesByAuthor[authorSlug2].reduce( - (acc, article) => acc + article.stat.rating, + (acc, article) => acc + article.stat?.rating, 0 ) if (author1Rating === author2Rating) {