mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-15 08:22:17 +00:00
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
This commit is contained in:
parent
810355d2a5
commit
8faf73084a
1 changed files with 1 additions and 1 deletions
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue