diff options
| author | Marak <[email protected]> | 2017-02-10 00:01:28 -0500 |
|---|---|---|
| committer | Marak <[email protected]> | 2017-02-10 00:01:28 -0500 |
| commit | fe2c0fd5cbdb49ec97b51b040a357ec4d6318571 (patch) | |
| tree | 7de1b374fb8ab3409aa560957cce1e26065742c8 /lib | |
| parent | c4dcdfb23dda1c0ad71e16870f9caf2dc14fc034 (diff) | |
| download | faker-fe2c0fd5cbdb49ec97b51b040a357ec4d6318571.tar.xz faker-fe2c0fd5cbdb49ec97b51b040a357ec4d6318571.zip | |
[api] [fix] [minor] Default shuffle value #405
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/helpers.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/helpers.js b/lib/helpers.js index 930fce1e..635c4ecc 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -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"]; |
