prosemirror-schema-list
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -0,1 +1,7 @@ | ||
## 1.2.1 (2022-07-20) | ||
### Bug fixes | ||
Fix a regression where lifting a nested list could crash. | ||
## 1.2.0 (2022-05-30) | ||
@@ -2,0 +8,0 @@ |
@@ -197,3 +197,6 @@ import { findWrapping, ReplaceAroundStep, canSplit, liftTarget } from 'prosemirror-transform'; | ||
} | ||
dispatch(tr.lift(range, liftTarget(range)).scrollIntoView()); | ||
const target = liftTarget(range); | ||
if (target == null) | ||
return false; | ||
dispatch(tr.lift(range, target).scrollIntoView()); | ||
return true; | ||
@@ -200,0 +203,0 @@ } |
{ | ||
"name": "prosemirror-schema-list", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "List-related schema elements and commands for ProseMirror", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -182,3 +182,5 @@ import {findWrapping, liftTarget, canSplit, ReplaceAroundStep} from "prosemirror-transform" | ||
} | ||
dispatch(tr.lift(range, liftTarget(range)!).scrollIntoView()) | ||
const target = liftTarget(range) | ||
if (target == null) return false | ||
dispatch(tr.lift(range, target).scrollIntoView()) | ||
return true | ||
@@ -185,0 +187,0 @@ } |
Sorry, the diff of this file is not supported yet
106198
1001