File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,17 @@ module.exports = function(grunt) {
1919 // Load `composer.json` as JSON, convert to object.
2020 var composer = grunt . file . readJSON ( 'composer.json' ) ;
2121 for ( var key in composer . extra [ 'installer-paths' ] ) {
22- var newKey = key . replace ( regex , pathPackage ) ;
23- if ( newKey != key ) {
24- // Alter keys in `extra.installer-paths` object to change `build/html`
25- // to `html` or an alternative path from the config.
26- var value = composer . extra [ 'installer-paths' ] [ key ] ;
27- delete composer . extra [ 'installer-paths' ] [ key ] ;
28- composer . extra [ 'installer-paths' ] [ newKey ] = value ;
29- changed = true ;
22+ // Add an unnecessary if check just for eslint rules.
23+ if ( composer . extra [ 'installer-paths' ] [ key ] ) {
24+ var newKey = key . replace ( regex , pathPackage ) ;
25+ if ( newKey !== key ) {
26+ // Alter keys in `extra.installer-paths` object to change `build/html`
27+ // to `html` or an alternative path from the config.
28+ var value = composer . extra [ 'installer-paths' ] [ key ] ;
29+ delete composer . extra [ 'installer-paths' ] [ key ] ;
30+ composer . extra [ 'installer-paths' ] [ newKey ] = value ;
31+ changed = true ;
32+ }
3033 }
3134 }
3235 if ( changed ) {
You can’t perform that action at this time.
0 commit comments