prosemirror-state
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -0,1 +1,7 @@ | ||
## 1.2.4 (2019-08-12) | ||
### Bug fixes | ||
`Transaction.setSelection` now immediately checks whether the given selection points into the proper document, rather than silently accepting an invalid selection. | ||
## 1.2.3 (2019-05-08) | ||
@@ -2,0 +8,0 @@ |
@@ -560,2 +560,4 @@ 'use strict'; | ||
Transaction.prototype.setSelection = function setSelection (selection) { | ||
if (selection.$from.doc != this.doc) | ||
{ throw new RangeError("Selection passed to setSelection must point at the current document") } | ||
this.curSelection = selection; | ||
@@ -562,0 +564,0 @@ this.curSelectionFor = this.steps.length; |
{ | ||
"name": "prosemirror-state", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "ProseMirror editor state", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -61,2 +61,4 @@ import {Transform} from "prosemirror-transform" | ||
setSelection(selection) { | ||
if (selection.$from.doc != this.doc) | ||
throw new RangeError("Selection passed to setSelection must point at the current document") | ||
this.curSelection = selection | ||
@@ -63,0 +65,0 @@ this.curSelectionFor = this.steps.length |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174223
1987