From f5de5297f740be498ea59c57819fb4b4a4acba3a Mon Sep 17 00:00:00 2001 From: Timothy Soehnlin Date: Tue, 27 Dec 2016 12:22:41 -0500 Subject: [PATCH] Allowing callback to be optional This allows callback to be optional as `$__validate` assumes callback is defined and not optional. --- lib/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/document.js b/lib/document.js index bb433f01a5b..08719092a8f 100644 --- a/lib/document.js +++ b/lib/document.js @@ -1232,7 +1232,7 @@ Document.prototype.validate = function(options, callback) { options = null; } - this.$__validate(callback); + this.$__validate(callback || function() {}); }; /*!