docs: make text node type in example more explicit (#4663)

pull/7738/head
Ademola 6 years ago committed by GitHub
parent 1c2996a938
commit 04a57cf07f

@ -8,7 +8,7 @@ While you should generally use CSS for transitions as much as possible, there ar
function typewriter(node, { speed = 50 }) { function typewriter(node, { speed = 50 }) {
const valid = ( const valid = (
node.childNodes.length === 1 && node.childNodes.length === 1 &&
node.childNodes[0].nodeType === 3 node.childNodes[0].nodeType === Node.TEXT_NODE
); );
if (!valid) { if (!valid) {

Loading…
Cancel
Save