minor fixes
This commit is contained in:
parent
f4c974d1e1
commit
f73a834f35
|
@ -16,7 +16,8 @@ const getDevCssClassPrefix = (filename: string): string => {
|
||||||
return filename
|
return filename
|
||||||
.slice(filename.indexOf(PATH_PREFIX) + PATH_PREFIX.length)
|
.slice(filename.indexOf(PATH_PREFIX) + PATH_PREFIX.length)
|
||||||
.replace('.module.scss', '')
|
.replace('.module.scss', '')
|
||||||
.replace(/[/\\]/, '-')
|
.replace(/[/?\\]/, '-')
|
||||||
|
.replace('?', '-')
|
||||||
}
|
}
|
||||||
|
|
||||||
const devGenerateScopedName = (name: string, filename: string, css: string) =>
|
const devGenerateScopedName = (name: string, filename: string, css: string) =>
|
||||||
|
|
|
@ -15,11 +15,11 @@ export const useTopAuthorsStore = () => {
|
||||||
return Object.keys(articlesByAuthor)
|
return Object.keys(articlesByAuthor)
|
||||||
.sort((authorSlug1, authorSlug2) => {
|
.sort((authorSlug1, authorSlug2) => {
|
||||||
const author1Rating = articlesByAuthor[authorSlug1].reduce(
|
const author1Rating = articlesByAuthor[authorSlug1].reduce(
|
||||||
(acc, article) => acc + article.stat.rating,
|
(acc, article) => acc + article.stat?.rating,
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
const author2Rating = articlesByAuthor[authorSlug2].reduce(
|
const author2Rating = articlesByAuthor[authorSlug2].reduce(
|
||||||
(acc, article) => acc + article.stat.rating,
|
(acc, article) => acc + article.stat?.rating,
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
if (author1Rating === author2Rating) {
|
if (author1Rating === author2Rating) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user