Skip to content

Commit

Permalink
[api] [fix] [minor] Default shuffle value #405
Browse files Browse the repository at this point in the history
  • Loading branch information
Marak committed Feb 10, 2017
1 parent c4dcdfb commit fe2c0fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ var Helpers = function (faker) {
* @param {array} o
*/
self.shuffle = function (o) {
if (o.length === 0) {
if (typeof o === 'undefined' || o.length === 0) {
return [];
}
o = o || ["a", "b", "c"];
Expand Down

0 comments on commit fe2c0fd

Please sign in to comment.