Skip to content

Commit 039ae86

Browse files
committed
Invert conditional, so it's clearer we can early-exit here.
IE Conditional Compilation comments have to stay, so make that intent clearer here by inverting the conditional.
1 parent 668660e commit 039ae86

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

XS.xs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,14 @@ void JsCollapseNodes(Node* curr) {
492492
JsCollapseNodeToWhitespace(curr);
493493
break;
494494
case NODE_BLOCKCOMMENT:
495+
/* IE Conditional Compilation comments do not get collapsed */
496+
if (nodeIsIECONDITIONALBLOCKCOMMENT(curr)) {
497+
break;
498+
}
495499
/* block comments get collapsed to WS if that's a side-affect
496500
* of their placement in the JS document.
497501
*/
498-
if (!nodeIsIECONDITIONALBLOCKCOMMENT(curr)) {
502+
{
499503
bool convert_to_ws = 0;
500504
/* find surrounding non-WS nodes */
501505
Node* nonws_prev = curr->prev;

0 commit comments

Comments
 (0)