DEV: ensure discovery getters don't fail with a missing #routeAttrs (#24549)

This commit is contained in:
Renato Atilio 2023-11-24 15:54:16 -03:00 committed by GitHub
parent d5f459db14
commit bf9c0c4889
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -21,19 +21,19 @@ export default class DiscoveryService extends Service {
get category() {
if (this.onDiscoveryRoute) {
return this.#routeAttrs.category;
return this.#routeAttrs?.category;
}
}
get tag() {
if (this.onDiscoveryRoute) {
return this.#routeAttrs.tag;
return this.#routeAttrs?.tag;
}
}
get currentTopicList() {
if (this.onDiscoveryRoute) {
return this.#routeAttrs.list;
return this.#routeAttrs?.list;
}
}