allow optional transformer to be set via the whitelist

This commit is contained in:
Sebastian McKenzie
2015-02-08 09:31:30 +11:00
parent dabe69856a
commit 785cb4b72f

View File

@@ -29,7 +29,7 @@ TransformerPass.prototype.canRun = function () {
// whitelist
var whitelist = opts.whitelist;
if (whitelist.length && !contains(whitelist, key)) return false;
if (whitelist.length) return contains(whitelist, key);
// optional
if (transformer.optional && !contains(opts.optional, key)) return false;