From ec313e54cf20776d2189f8cd420693a404c6fbc4 Mon Sep 17 00:00:00 2001 From: EthanBlackburn Date: Fri, 17 Jul 2015 16:18:24 -0700 Subject: [PATCH] query trimming now works properly on searchquerycommitted Summary: query trimming was broken due to searchquerycommited passing an object instead of a string Test Plan: tested manually. Unit tests Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D1763 --- src/flux/stores/focused-category-store.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flux/stores/focused-category-store.coffee b/src/flux/stores/focused-category-store.coffee index 5d27693fa..b6f096317 100644 --- a/src/flux/stores/focused-category-store.coffee +++ b/src/flux/stores/focused-category-store.coffee @@ -32,6 +32,8 @@ class FocusedCategoryStore extends NylasStore @_setCategory(category) _onSearchQueryCommitted: (query="") -> + if typeof(query) != "string" + query = query[0].all if query.trim().length > 0 and @_category @_categoryBeforeSearch = @_category @_setCategory(null)