From: Mike Taylor Date: Tue, 7 Oct 2014 16:30:21 +0000 (+0100) Subject: Simplify logic for establishing onTerm callback. X-Git-Tag: 1.0.0~287 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=de3df79520623cacfb5dc52bb475a139594b21e2;p=mkws-moved-to-github.git Simplify logic for establishing onTerm callback. --- diff --git a/src/mkws-team.js b/src/mkws-team.js index b46142f..8a73211 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -172,9 +172,9 @@ mkws.makeTeam = function($, teamName) { params.onstat = onStat; log("setting stat callback"); } - if (m_queues.termlists) { + if (m_queues.termlists && config.facets.length) { + params.onterm = onTerm; log("setting term callback"); - params.onterm = (config.facets.length ? onTerm : undefined); } if (m_queues.records) { log("setting show callback");