Will fire an error if no nodes are found.
johnfrancisli opened this issue · comments
Francis Li commented
This fires an error on situations when it tries to grab the head but no head is set because it will look for a childNode on something null.
Ideally we should have a check like:
$dom_node = $dom->getElementsByTagName( 'head' )[0]; $nodes = $dom_node ? $dom_node->childNodes : [];
Let me know if it makes sense?
Luis Herranz commented
Sounds good to me @johnfrancisli 🙂
Would you mind doing a PR with that change?
Francis Li commented
Sorry didn't see this until now.
Luis Herranz commented
@johnfrancisli no problem! 😄
@DAreRodz can you take a look at the PR and run the tests locally?