From e9bf513397bb71afc80260e2c5da7856f47420c6 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 27 May 2014 16:46:11 +0100 Subject: [PATCH] Invert if(query) test and queue("ready") wrapper. --- src/mkws-widget.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mkws-widget.js b/src/mkws-widget.js index 534e4b3..b676039 100644 --- a/src/mkws-widget.js +++ b/src/mkws-widget.js @@ -134,8 +134,8 @@ widget.autosearch = function(widget) { } } - widget.team.queue("ready").subscribe(function() { - if (query) { + if (query) { + widget.team.queue("ready").subscribe(function() { var sortOrder = widget.config.sort; var maxrecs = widget.config.maxrecs; var perpage = widget.config.perpage; @@ -155,8 +155,8 @@ widget.autosearch = function(widget) { widget.log(s); widget.team.newSearch(query, sortOrder, maxrecs, perpage, limit, targets, targetfilter); - } - }); + }); + } }; -- 1.7.10.4