fix(ivy): should support components without selector (#27169)

PR Close #27169
This commit is contained in:
Marc Laval
2018-11-22 15:38:28 +01:00
committed by Jason Aden
parent d767e0b2c0
commit c2f30542e7
10 changed files with 467 additions and 425 deletions

View File

@ -65,7 +65,7 @@ export function isNodeMatchingSelector(tNode: TNode, selector: CssSelector): boo
if (mode & SelectorFlags.ELEMENT) {
mode = SelectorFlags.ATTRIBUTE | mode & SelectorFlags.NOT;
if (current !== '' && current !== tNode.tagName) {
if (current !== '' && current !== tNode.tagName || current === '' && selector.length === 1) {
if (isPositive(mode)) return false;
skipToNextSelector = true;
}