Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 04678ca

Browse files
authored
FIX: Discovery search would break normal search for anons (#1143)
1 parent f922012 commit 04678ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

assets/javascripts/discourse/connectors/full-page-search-below-search-header/ai-full-page-discobot-discoveries.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default class AiFullPageDiscobotDiscoveries extends Component {
99
static shouldRender(_args, { siteSettings, currentUser }) {
1010
return (
1111
siteSettings.ai_bot_discover_persona &&
12-
currentUser.can_use_ai_bot_discover_persona
12+
currentUser?.can_use_ai_bot_discover_persona
1313
);
1414
}
1515

assets/javascripts/discourse/connectors/search-menu-results-type-top/ai-discobot-discoveries.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default class AiDiscobotDiscoveries extends Component {
1010
return (
1111
args.resultType.type === "topic" &&
1212
siteSettings.ai_bot_discover_persona &&
13-
currentUser.can_use_ai_bot_discover_persona
13+
currentUser?.can_use_ai_bot_discover_persona
1414
);
1515
}
1616

0 commit comments

Comments
 (0)