mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: category search was failing for anon
This commit is contained in:
parent
7edf7b590f
commit
19f4fe2ada
1 changed files with 2 additions and 1 deletions
|
@ -75,7 +75,8 @@ export default createWidget('search-menu', {
|
|||
|
||||
let url = '/search?q=' + encodeURIComponent(searchData.term);
|
||||
if (contextEnabled) {
|
||||
if (ctx.id.toString().toLowerCase() === this.currentUser.username_lower &&
|
||||
if (this.currentUser &&
|
||||
ctx.id.toString().toLowerCase() === this.currentUser.username_lower &&
|
||||
type === "private_messages") {
|
||||
url += ' in:private';
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue