mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-19 05:31:56 +02:00
Fix transform "wrapTextAtRange" throwing JS error
This commit is contained in:
@@ -1012,8 +1012,8 @@ export function wrapTextAtRange(transform, range, prefix, suffix = prefix, optio
|
||||
end = end.moveForward(prefix.length)
|
||||
}
|
||||
|
||||
transform.insertTextAtRange(start, prefix, { normalize })
|
||||
transform.insertTextAtRange(end, suffix, { normalize })
|
||||
transform.insertTextAtRange(start, prefix, [], { normalize })
|
||||
transform.insertTextAtRange(end, suffix, [], { normalize })
|
||||
|
||||
return transform
|
||||
}
|
||||
|
Reference in New Issue
Block a user