We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2a8c7d7 + 74cff68 commit 2f06c71Copy full SHA for 2f06c71
1 file changed
lib/csscomb.js
@@ -77,15 +77,11 @@ Comb.prototype = {
77
this._options.forEach(function(option) {
78
try {
79
var handler = require('./options/' + option);
80
- var shouldDetect = true;
81
- if (options && options.indexOf(option) === -1) {
82
- shouldDetect = false;
83
- }
84
- if (handler && shouldDetect) {
85
- handler._name = option;
86
- this._detected[option] = [];
87
- this._handlers.push(handler);
88
+ if (!handler || options && options.indexOf(option) === -1) return;
+
+ handler._name = option;
+ this._detected[option] = [];
+ this._handlers.push(handler);
89
} catch (e) {
90
console.warn('Error loading "%s" handler: %s', option, e.message);
91
}
0 commit comments