I'm not sure on this query && query.text. It'll end up with a boolean into the function right? In which case it's not a query/query string any more but a hasSearch or something like right?