Skip to content

Commit cddb01b

Browse files
committed
Fix case where false resulted in a skipped node
1 parent 0efec69 commit cddb01b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export const findAndReplace =
160160
value = value.length > 0 ? {type: 'text', value} : undefined
161161
}
162162

163-
if (value !== false) {
163+
if (value === false) {
164+
position = undefined
165+
} else {
164166
if (start !== position) {
165167
nodes.push({
166168
type: 'text',

0 commit comments

Comments
 (0)