diff --git a/site/content/tutorial/10-transitions/05-custom-js-transitions/text.md b/site/content/tutorial/10-transitions/05-custom-js-transitions/text.md index da775bbeb3..cc25861c7b 100644 --- a/site/content/tutorial/10-transitions/05-custom-js-transitions/text.md +++ b/site/content/tutorial/10-transitions/05-custom-js-transitions/text.md @@ -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 }) { } }; } -``` \ No newline at end of file +```