From 4dd03ad6febd57c50f482f4c443d535b4f9ae33b Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 21 Aug 2015 14:39:55 -0400 Subject: [PATCH] FIX: Couldn't restrict search to a category --- app/assets/javascripts/discourse/controllers/search.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/search.js.es6 b/app/assets/javascripts/discourse/controllers/search.js.es6 index 553543646f5..4c39f5dbcac 100644 --- a/app/assets/javascripts/discourse/controllers/search.js.es6 +++ b/app/assets/javascripts/discourse/controllers/search.js.es6 @@ -41,7 +41,7 @@ export default Em.Controller.extend({ const searchContext = this.get('searchContext'); if (this.get('searchContextEnabled')) { - if (searchContext.id.toLowerCase() === this.get('currentUser.username_lower') && + if (searchContext.id.toString().toLowerCase() === this.get('currentUser.username_lower') && searchContext.type === "private_messages" ) { url += ' in:private';