File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ var vfs = require('vow-fs');
66/**
77 * Starts Code Style processing process.
88 *
9+ * @constructor
910 * @name Comb
1011 */
1112var Comb = function ( ) {
@@ -35,17 +36,18 @@ Comb.prototype = {
3536 * @param {Object } config
3637 */
3738 configure : function ( config ) {
38- var _this = this ;
3939 this . _handlers = [ ] ;
4040 this . _options . forEach ( function ( option ) {
41- if ( config [ option ] !== undefined ) {
42- try {
43- var handler = require ( './options/' + option ) . setValue ( config [ option ] ) ;
44- handler && _this . _handlers . push ( handler ) ;
45- } catch ( e ) {
46- }
41+ if ( typeof config [ option ] === 'undefined' ) return ;
42+
43+ try {
44+ var handler = require ( './options/' + option ) . setValue ( config [ option ] ) ;
45+ handler && this . _handlers . push ( handler ) ;
46+ } catch ( e ) {
47+ console . warn ( 'Error loading "%s" handler: %s' , option , e . message ) ;
4748 }
48- } ) ;
49+ } , this ) ;
50+
4951 this . _exclude = ( config . exclude || [ ] ) . map ( function ( pattern ) {
5052 return new minimatch . Minimatch ( pattern ) ;
5153 } ) ;
You can’t perform that action at this time.
0 commit comments