mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 15:54:23 +08:00
FIX: Search menu widget breaks when context type is null
.
This commit is contained in:
parent
c392994793
commit
7a243e859e
|
@ -85,7 +85,7 @@ export default createWidget('search-menu', {
|
||||||
|
|
||||||
query += `q=${encodeURIComponent(searchData.term)}`;
|
query += `q=${encodeURIComponent(searchData.term)}`;
|
||||||
|
|
||||||
if (contextEnabled) {
|
if (contextEnabled && ctx) {
|
||||||
if (this.currentUser &&
|
if (this.currentUser &&
|
||||||
ctx.id.toString().toLowerCase() === this.currentUser.username_lower &&
|
ctx.id.toString().toLowerCase() === this.currentUser.username_lower &&
|
||||||
type === "private_messages") {
|
type === "private_messages") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user