From 8faf73084a5380a7082d68926efd734dafa6c3c9 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Mon, 23 May 2016 22:33:18 -0500 Subject: [PATCH] fix: correct sort task when task is at the top closes #7457 !0 === true, so we need to check for == null which matches undefined and null --- common/script/ops/sortTask.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/script/ops/sortTask.js b/common/script/ops/sortTask.js index ce002d8dc0..9a50abbe46 100644 --- a/common/script/ops/sortTask.js +++ b/common/script/ops/sortTask.js @@ -21,7 +21,7 @@ module.exports = function sortTask (user, req = {}) { if (index === -1) { throw new NotFound(i18n.t('messageTaskNotFound', req.language)); } - if (!to && !fromParam) { + if (to == null && fromParam == null) { throw new BadRequest('?to=__&from=__ are required'); }