From 8a20fb1dcb86ac9271460c76b90de8e54040c398 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 21 Mar 2025 00:18:06 +0000 Subject: [PATCH] Remove duplicate length check from expression.genCSS() Follows-up 53f84f02bad6e, which started the conditional with a check for `i + 1 < this.value.length`, which is the same as the parent block. --- packages/less/src/less/tree/expression.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/less/src/less/tree/expression.js b/packages/less/src/less/tree/expression.js index 03b40a1c8..e7951259d 100644 --- a/packages/less/src/less/tree/expression.js +++ b/packages/less/src/less/tree/expression.js @@ -57,7 +57,7 @@ Expression.prototype = Object.assign(new Node(), { for (let i = 0; i < this.value.length; i++) { this.value[i].genCSS(context, output); if (!this.noSpacing && i + 1 < this.value.length) { - if (i + 1 < this.value.length && !(this.value[i + 1] instanceof Anonymous) || + if (!(this.value[i + 1] instanceof Anonymous) || this.value[i + 1] instanceof Anonymous && this.value[i + 1].value !== ',') { output.add(' '); }