Fix Category-Metadata path parsing

## Issue
6849 category metadata shows in place of creator channel when using vanity URL
This commit is contained in:
infinite-persistence 2021-08-30 12:51:01 +08:00
parent 4dfcb4645a
commit 90c469454a
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -66,7 +66,7 @@ function escapeHtmlProperty(property) {
} }
function getCategoryMeta(path) { function getCategoryMeta(path) {
const page = Object.keys(CATEGORY_METADATA).find((x) => path.endsWith(x) || path.endsWith(`${x}/`)); const page = Object.keys(CATEGORY_METADATA).find((x) => path === `/$/${x}` || path === `/$/${x}/`);
return CATEGORY_METADATA[page]; return CATEGORY_METADATA[page];
} }