From 9a34d5c5b8a348c199bc3f606ff6ca5b003e2f31 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 21 Mar 2024 16:55:03 +0000 Subject: [PATCH] Remove redundant return from `parsers.blockRuleset()` --- packages/less/src/less/parser/parser.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/less/src/less/parser/parser.js b/packages/less/src/less/parser/parser.js index 59aa2eef4..30d0ed11c 100644 --- a/packages/less/src/less/parser/parser.js +++ b/packages/less/src/less/parser/parser.js @@ -1478,11 +1478,9 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) { blockRuleset: function() { let block = this.block(); - if (block) { - block = new tree.Ruleset(null, block); + return new tree.Ruleset(null, block); } - return block; }, detachedRuleset: function() { @@ -2491,4 +2489,4 @@ Parser.serializeVars = vars => { return s; }; -export default Parser; \ No newline at end of file +export default Parser;