@seafile/sdoc-editor 2.0.178 → 2.0.180

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -183,7 +183,7 @@ var deleteMerge = exports.deleteMerge = function deleteMerge(editor) {
183
183
  type: 'remove_text'
184
184
  });
185
185
  }
186
- if (!isSingleText && isAcrossBlocks && endRef.current && start.current) {
186
+ if (!isSingleText && isAcrossBlocks && endRef.current && startRef.current) {
187
187
  _slate.Transforms.mergeNodes(editor, {
188
188
  at: endRef.current,
189
189
  hanging: true,
@@ -156,7 +156,7 @@ var DiffText = /*#__PURE__*/(0, _createClass2["default"])(function DiffText(oldV
156
156
  var newPos = basePath.newPos;
157
157
  var oldPos = newPos - diagonalPath;
158
158
  var commonCount = 0;
159
- while (newPos + 1 < newLen && oldPos + 1 < oldLen && _this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
159
+ while (newPos + 1 < newLen && oldPos + 1 < oldLen && _this.equals(newString[newPos + 1] || '', oldString[oldPos + 1] || '')) {
160
160
  newPos++;
161
161
  oldPos++;
162
162
  commonCount++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.178",
3
+ "version": "2.0.180",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "87fc662ec0e2f2d77c18469bd5cd7c6c099f2149"
74
+ "gitHead": "dfaf1eb72e84f2bea5d9b6aef3887cb077398750"
75
75
  }