From 262987d1714a82b5fa29010b560b691869f9b404 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 25 Nov 2020 16:36:42 +0300 Subject: [PATCH] minor fix... Signed-off-by: Alex A. Naanou --- runner.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/runner.js b/runner.js index 0a33d82..67798b6 100644 --- a/runner.js +++ b/runner.js @@ -352,14 +352,12 @@ object.Constructor('TaskManager', Array, events.EventMixin('flat', { // -> manager // titled: function(title){ - var titles = - title == 'all' - || title == '*' - || new Set([...arguments]) + if(title == 'all' || title == '*'){ + return this } + var titles = new Set([...arguments]) return this .filter(function(task){ - return titles === true - || titles.has(task.title) }) }, + return titles.has(task.title) }) }, send: function(title, ...args){ if(title == 'all' || title == '*'){ @@ -369,7 +367,7 @@ object.Constructor('TaskManager', Array, events.EventMixin('flat', { return this.titled( ...(title instanceof Array) ? title - : [title])) + : [title]) .send('all', ...args) }, // XXX each task should also trigger this when stopping and this