Skip to content

Commit 6448a5d

Browse files
committed
Change to yield undefined
1 parent 19cf2fd commit 6448a5d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

lib/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ export function findAndReplace(tree, find, replace, options) {
136136
visitParents(tree, 'text', visitor)
137137
}
138138

139-
// @ts-expect-error: To do next major: don’t return the given tree.
140-
return tree
141-
142139
/** @type {import('unist-util-visit-parents').BuildVisitor<Root, 'text'>} */
143140
function visitor(node, parents) {
144141
let index = -1

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Partial matches are not supported.
160160

161161
###### Returns
162162

163-
Given, modified, tree ([`Node`][node]).
163+
Nothing (`undefined`).
164164

165165
### `defaultIgnore`
166166

0 commit comments

Comments
 (0)