@@ -45,11 +45,11 @@ module.exports = function(opt) {
45
45
args . push ( '--unix-newlines' ) ;
46
46
}
47
47
48
- if ( options . style !== null ) {
48
+ if ( typeof options . style !== 'undefined' ) {
49
49
args . push ( '-t' , options . style . toString ( ) ) ;
50
50
}
51
51
52
- if ( options . format !== null ) {
52
+ if ( typeof options . format !== 'undefined' ) {
53
53
args . push ( '-f' , options . format . toString ( ) ) ;
54
54
}
55
55
@@ -71,23 +71,23 @@ module.exports = function(opt) {
71
71
args . push ( '--cdata' ) ;
72
72
}
73
73
74
- if ( options . autoclose !== null ) {
74
+ if ( typeof options . autoclose !== 'undefined' ) {
75
75
var list = options . autoclose ;
76
76
if ( isArray ( list ) ) {
77
77
list = list . join ( ',' ) ;
78
78
}
79
79
args . push ( '--autoclose' , list . toString ( ) ) ;
80
80
}
81
81
82
- if ( options . require !== null ) {
82
+ if ( typeof options . require !== 'undefined' ) {
83
83
args . push ( '-r' , '"' + options . require + '"' ) ;
84
84
}
85
85
86
86
if ( options . suppressEval ) {
87
87
args . push ( '--suppress-eval' ) ;
88
88
}
89
89
90
- if ( options . loadPath !== null ) {
90
+ if ( typeof options . loadPath !== 'undefined' ) {
91
91
args . push ( '-I' , '"' + options . loadPath + '"' ) ;
92
92
}
93
93
@@ -110,11 +110,15 @@ module.exports = function(opt) {
110
110
} ) ;
111
111
112
112
var hamlData = '' ;
113
- cp . stdout . on ( 'data' , function ( data ) { hamlData += data . toString ( ) ; } ) ;
113
+ cp . stdout . on ( 'data' , function ( data ) {
114
+ hamlData += data . toString ( ) ;
115
+ } ) ;
114
116
115
117
var errors = '' ;
116
118
cp . stderr . setEncoding ( 'utf8' ) ;
117
- cp . stderr . on ( 'data' , function ( data ) { errors += data . toString ( ) ; } ) ;
119
+ cp . stderr . on ( 'data' , function ( data ) {
120
+ errors += data . toString ( ) ;
121
+ } ) ;
118
122
119
123
cp . on ( 'close' , function ( code ) {
120
124
if ( errors ) {
0 commit comments