Commit 4491ab43 by Tri Nguyen Committed by Michael Mifsud

Check options to be an object (#1825)

parent a7e6bead
......@@ -182,6 +182,9 @@ function buildIncludePaths(options) {
*/
function getOptions(opts, cb) {
if (typeof opts !== 'object') {
throw new Error('Invalid: options is not an object.');
}
var options = clonedeep(opts || {});
options.sourceComments = options.sourceComments || false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment