Skip to content

Commit 74cff68

Browse files
committed
Detection: Remove shouldDetect var
1 parent 2a8c7d7 commit 74cff68

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

lib/csscomb.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,11 @@ Comb.prototype = {
7777
this._options.forEach(function(option) {
7878
try {
7979
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-
}
80+
if (!handler || options && options.indexOf(option) === -1) return;
81+
82+
handler._name = option;
83+
this._detected[option] = [];
84+
this._handlers.push(handler);
8985
} catch (e) {
9086
console.warn('Error loading "%s" handler: %s', option, e.message);
9187
}

0 commit comments

Comments
 (0)