FIX: Account for not having a unicode_title (#28)

Mistakenly forgot to check for presence of unicode title and use the appropriate one.
This commit is contained in:
Justin DiRose 2021-01-18 12:17:29 -06:00 committed by GitHub
parent f32aebdba0
commit 68a7243a66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -27,11 +27,12 @@ export default DiscourseRoute.extend({
const model = this.currentModel; const model = this.currentModel;
const pageTitle = I18n.t("docs.title"); const pageTitle = I18n.t("docs.title");
if (model.topic.title && model.topic.category_id) { if (model.topic.title && model.topic.category_id) {
const title = model.topic.unicode_title || model.topic.title;
const categoryName = this.site.categories.findBy( const categoryName = this.site.categories.findBy(
"id", "id",
model.topic.category_id model.topic.category_id
).name; ).name;
return `${model.topic.unicode_title} - ${categoryName} - ${pageTitle}`; return `${title} - ${categoryName} - ${pageTitle}`;
} else { } else {
return pageTitle; return pageTitle;
} }