Skip to content

Commit 8233bc8

Browse files
committed
fix to work in node 4
1 parent e4f62f6 commit 8233bc8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/helpers/flatten.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12

23
/**
34
* Flatten an array

lib/validator.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ function loadRules() {
2626
*
2727
* @param {Object} opts
2828
*/
29-
function Validator(opts = {}) {
30-
this.opts = deepExtend({
29+
function Validator(opts) {
30+
this.opts = {
3131
messages: defaultMessages
32-
}, opts);
32+
};
33+
34+
if (opts)
35+
deepExtend(this.opts, opts);
3336

3437
this.messages = this.opts.messages;
3538

0 commit comments

Comments
 (0)