FIX: Search menu widget breaks when context type is `null`.

This commit is contained in:
Guo Xiang Tan 2017-02-03 09:38:51 +08:00
parent c392994793
commit 7a243e859e
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ export default createWidget('search-menu', {
query += `q=${encodeURIComponent(searchData.term)}`;
if (contextEnabled) {
if (contextEnabled && ctx) {
if (this.currentUser &&
ctx.id.toString().toLowerCase() === this.currentUser.username_lower &&
type === "private_messages") {