correct logic
This commit is contained in:
parent
72684c3c7f
commit
84c6c2b48c
|
@ -40,12 +40,13 @@ export default Em.Controller.extend({
|
||||||
let url = '/search?q=' + encodeURIComponent(this.get('term'));
|
let url = '/search?q=' + encodeURIComponent(this.get('term'));
|
||||||
const searchContext = this.get('searchContext');
|
const searchContext = this.get('searchContext');
|
||||||
|
|
||||||
if (this.get('searchContextEnabled') &&
|
if (this.get('searchContextEnabled')) {
|
||||||
searchContext.id.toLowerCase() === this.get('currentUser.username_lower')) {
|
if (searchContext.id.toLowerCase() === this.get('currentUser.username_lower')) {
|
||||||
url += ' in:private';
|
url += ' in:private';
|
||||||
} else {
|
} else {
|
||||||
url += encodeURIComponent(" " + searchContext.type + ":" + searchContext.id);
|
url += encodeURIComponent(" " + searchContext.type + ":" + searchContext.id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return url;
|
return url;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue