register: fix ignoreRegex compatibility check

This commit is contained in:
Sebastian McKenzie
2014-11-07 13:52:13 +11:00
parent e5f1eb64b6
commit 71646f4ade

View File

@@ -97,7 +97,7 @@ module.exports = function (opts) {
// normalise options
opts = opts || {};
if (_.isRegExp(opts)) opts = { ignore: opts };
opts.ignore = opts.ignore || opts.ignoreRegex;
if (opts.ignoreRegex != null) opts.ignore = opts.ignoreRegex;
if (opts.only != null) onlyRegex = opts.only;
if (opts.ignore != null) ignoreRegex = opts.ignore;