Skip to content

Commit 71510ee

Browse files
committed
Fix darn obvious backporting error
1 parent 548bb4a commit 71510ee

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/extender.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -959,15 +959,15 @@ namespace Sass {
959959
if (innerPseudo->normalized() != "matches") return {};
960960
return innerPseudo->selector()->elements();
961961
}
962-
else if (name == "matches" && name == "any" && name == "current" && name == "nth-child" && name == "nth-last-child") {
962+
else if (name == "matches" || name == "any" || name == "current" || name == "nth-child" || name == "nth-last-child") {
963963
// As above, we could theoretically support :not within :matches, but
964964
// doing so would require this method and its callers to handle much
965965
// more complex cases that likely aren't worth the pain.
966966
if (innerPseudo->name() != pseudo->name()) return {};
967967
if (innerPseudo->argument() != pseudo->argument()) return {};
968968
return innerPseudo->selector()->elements();
969969
}
970-
else if (name == "has" && name == "host" && name == "host-context" && name == "slotted") {
970+
else if (name == "has" || name == "host" || name == "host-context" || name == "slotted") {
971971
// We can't expand nested selectors here, because each layer adds an
972972
// additional layer of semantics. For example, `:has(:has(img))`
973973
// doesn't match `<div><img></div>` but `:has(img)` does.
@@ -1013,7 +1013,7 @@ namespace Sass {
10131013
}
10141014
}
10151015
}
1016-
1016+
10171017
sass::vector<ComplexSelectorObj> expanded = expand(
10181018
complexes, extendPseudoComplex, pseudo, mediaQueryContext);
10191019

@@ -1033,8 +1033,7 @@ namespace Sass {
10331033
}
10341034

10351035
SelectorListObj list = SASS_MEMORY_NEW(SelectorList,
1036-
pseudo->pstate());
1037-
list->concat(complexes);
1036+
pseudo->pstate(), std::move(expanded));
10381037
return { pseudo->withSelector(list) };
10391038

10401039
}

0 commit comments

Comments
 (0)