From de3df79520623cacfb5dc52bb475a139594b21e2 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 7 Oct 2014 17:30:21 +0100 Subject: [PATCH] Simplify logic for establishing onTerm callback. --- src/mkws-team.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); -- 1.7.10.4