mirror of
https://github.com/outline/outline.git
synced 2026-12-01 01:14:11 +03:00
fix: Protect against 'position out of range'
This commit is contained in:
1 parent
d6c074102b
commit
fd4ab0077d
1 file changed
+1
-1
@@ -78,7 +78,7 @@ export default class Placeholder extends Mark {
|
||||
const range =
|
||||
getMarkRange(doc.resolve(pos.pos), schema.marks.placeholder) ||
|
||||
getMarkRange(
|
||||
doc.resolve(pos.pos - 1),
|
||||
doc.resolve(Math.max(0, pos.pos - 1)),
|
||||
schema.marks.placeholder
|
||||
);
|
||||
if (!range) {
|
||||
|
||||
Reference in new issue
Block a user