mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
correct logic
This commit is contained in:
parent
72684c3c7f
commit
84c6c2b48c
1 changed files with 6 additions and 5 deletions
|
@ -40,11 +40,12 @@ export default Em.Controller.extend({
|
|||
let url = '/search?q=' + encodeURIComponent(this.get('term'));
|
||||
const searchContext = this.get('searchContext');
|
||||
|
||||
if (this.get('searchContextEnabled') &&
|
||||
searchContext.id.toLowerCase() === this.get('currentUser.username_lower')) {
|
||||
url += ' in:private';
|
||||
} else {
|
||||
url += encodeURIComponent(" " + searchContext.type + ":" + searchContext.id);
|
||||
if (this.get('searchContextEnabled')) {
|
||||
if (searchContext.id.toLowerCase() === this.get('currentUser.username_lower')) {
|
||||
url += ' in:private';
|
||||
} else {
|
||||
url += encodeURIComponent(" " + searchContext.type + ":" + searchContext.id);
|
||||
}
|
||||
}
|
||||
|
||||
return url;
|
||||
|
|
Loading…
Reference in a new issue