Skip to content

Commit

Permalink
fix: correct sort task when task is at the top
Browse files Browse the repository at this point in the history
closes #7457

!0 === true, so we need to check for == null which matches undefined and
null
  • Loading branch information
crookedneighbor committed May 24, 2016
1 parent 810355d commit 8faf730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/script/ops/sortTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 8faf730

Please sign in to comment.