diff --git a/app/assets/javascripts/discourse/app/services/discovery.js b/app/assets/javascripts/discourse/app/services/discovery.js index 5e8d65ccb3a..48fd873b291 100644 --- a/app/assets/javascripts/discourse/app/services/discovery.js +++ b/app/assets/javascripts/discourse/app/services/discovery.js @@ -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; } }