Skip to content

Commit

Permalink
docs: use Node.TEXT_NODE in more places
Browse files Browse the repository at this point in the history
  • Loading branch information
Conduitry committed Apr 12, 2020
1 parent 8ddb073 commit 0d263cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion site/content/docs/02-template-syntax.md
Expand Up @@ -893,7 +893,7 @@ A custom transition function can also return a `tick` function, which is called
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) return {};
Expand Down
Expand Up @@ -4,7 +4,7 @@
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) {
Expand Down Expand Up @@ -33,4 +33,4 @@
<p in:typewriter>
The quick brown fox jumps over the lazy dog
</p>
{/if}
{/if}
Expand Up @@ -4,7 +4,7 @@
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) {
Expand Down Expand Up @@ -33,4 +33,4 @@
<p in:typewriter>
The quick brown fox jumps over the lazy dog
</p>
{/if}
{/if}

0 comments on commit 0d263cc

Please sign in to comment.