Skip to content

Commit

Permalink
update fn.toArray helper
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Jun 29, 2017
1 parent 6ebebdd commit 60c6357
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taskr/lib/fn.js
Expand Up @@ -9,7 +9,7 @@ $.isObject = val => Boolean(val) && (val.constructor === Object);

$.isEmptyObj = val => $.isObject(val) && !Object.keys(val).length;

$.toArray = val => (val === null || val === undefined) ? [] : Array.isArray(val) ? val : [val];
$.toArray = val => Array.isArray(val) ? val : (val == null) ? [] : [val];

/**
* Format a task's duration.
Expand Down

0 comments on commit 60c6357

Please sign in to comment.