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

pull/4670/head
Ademola 4 years ago committed by GitHub
parent 1087e31059
commit 7be80e96c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save