diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/time.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/time.js b/lib/time.js index 51f7a28f..580d33ee 100644 --- a/lib/time.js +++ b/lib/time.js @@ -11,7 +11,11 @@ var _Time = function(faker) { * @method faker.time.recent * @param {string} outputType - 'abbr' || 'wide' || 'unix' (default choice) */ - self.recent = function(outputType = "unix") { + self.recent = function(outputType) { + if (typeof outputType === "undefined") { + outputType = 'unix'; + } + var date = new Date(); switch (outputType) { case "abbr": @@ -21,7 +25,6 @@ var _Time = function(faker) { date = date.toTimeString(); break; case "unix": - default: date = date.getTime(); break; } |
