FIX: category search was failing for anon

This commit is contained in:
Arpit Jalan 2016-06-17 10:07:49 +05:30
parent 7edf7b590f
commit 19f4fe2ada

View file

@ -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 {