From 0e5fc9c87c4a2c8d3cecaa0e389bd2f4d8ccea28 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 24 Apr 2014 11:26:03 +0100 Subject: [PATCH] Switch on filter type, not presence of "id" field. --- src/mkws-team.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mkws-team.js b/src/mkws-team.js index 2e24854..d99370d 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -193,7 +193,7 @@ function team($, teamName) { that.delimitTarget = function(id) { log("delimitTarget(id=" + id + ")"); - m_filterSet.removeMatching(function(f) { return f.id }); + m_filterSet.removeMatching(function(f) { return f.type === 'target' }); triggerSearch(); return false; }; @@ -201,7 +201,8 @@ function team($, teamName) { that.delimitQuery = function(field, value) { log("delimitQuery(field=" + field + ", value=" + value + ")"); - m_filterSet.removeMatching(function(f) { return f.field && field == f.field && value == f.value }); + m_filterSet.removeMatching(function(f) { return f.type == 'field' && + field == f.field && value == f.value }); triggerSearch(); return false; }; -- 1.7.10.4