Warning if no parent nodes can be found (can we do better?)

This commit is contained in:
Tony Garnock-Jones 2019-06-20 22:45:04 +01:00
parent dbfd5dc8e6
commit d2ecf7da71
1 changed files with 4 additions and 0 deletions

View File

@ -114,6 +114,10 @@ spawn named 'UIFragmentFactory' {
orderBy = newOrderBy;
anchorNodes = (selector !== null) ? selectorMatch(document, selector) : [];
if (anchorNodes.length === 0) {
console.warn('UIFragment found no parent nodes matching selector', selector, fragmentId);
}
anchorNodes.forEach((anchorNode) => {
let insertionPoint = findInsertionPoint(anchorNode, orderBy, fragmentId);
htmlToNodes(anchorNode, html).forEach((newNode) => {