Skip to content

Commit 457cce1

Browse files
committed
fixed op precedence in conditionals
1 parent 2b01eef commit 457cce1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

index.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function parse(selector, options){
8787

8888
name = getName();
8989

90-
if(!options || "lowerCaseTags" in options ? options.lowerCaseTags : !options.xmlMode){
90+
if(!options || ("lowerCaseTags" in options ? options.lowerCaseTags : !options.xmlMode)){
9191
name = name.toLowerCase();
9292
}
9393

@@ -138,10 +138,11 @@ function parse(selector, options){
138138
name = unescapeCSS(data[1]);
139139

140140
if(
141-
!options ||
142-
"lowerCaseAttributeNames" in options ?
143-
options.lowerCaseAttributeNames :
144-
!options.xmlMode
141+
!options || (
142+
"lowerCaseAttributeNames" in options ?
143+
options.lowerCaseAttributeNames :
144+
!options.xmlMode
145+
)
145146
){
146147
name = name.toLowerCase();
147148
}

0 commit comments

Comments
 (0)