Skip to content

Commit

Permalink
fix: Have isText return whether the node is a text node
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 committed May 15, 2021
1 parent acb7f3f commit c323224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export function isCDATA(node: Node): node is NodeWithChildren {
* @param node Node to check.
* @returns `true` if the node has the type `Text`, `false` otherwise.
*/
export function isText(node: Node): node is DataNode {
export function isText(node: Node): node is Text {
return node.type === ElementType.Text;
}

Expand Down

0 comments on commit c323224

Please sign in to comment.