JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
JavaScript
// 2, but should be 1
console.log( $("div").add("<div>test</div>").before("t")[1].parentNode.childNodes.length );
// exception
$("div").add( "<div/>" ).after("test")
<div></div>
// 2, but should be 1
console.log( $("div").add("<div>test</div>").before("t")[1].parentNode.childNodes.length );
// exception
$("div").add( "<div/>" ).after("test")