@seafile/sdoc-editor 0.4.24 → 0.4.27

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.
@@ -1257,8 +1257,12 @@ export const getRowDomHeight = (editor, row) => {
1257
1257
  rowspan = 1
1258
1258
  } = cell;
1259
1259
  if (is_combined || rowspan > 1) continue;
1260
- const cellDom = ReactEditor.toDOMNode(editor, cell);
1261
- if (!cellDom) break;
1260
+ let cellDom = null;
1261
+ try {
1262
+ cellDom = ReactEditor.toDOMNode(editor, cell);
1263
+ } catch (error) {
1264
+ if (!cellDom) break;
1265
+ }
1262
1266
  height = cellDom.getBoundingClientRect().height;
1263
1267
  break;
1264
1268
  }
@@ -18,7 +18,7 @@ const RowHeader = _ref => {
18
18
  tableSize
19
19
  } = _ref;
20
20
  const editor = useSlateStatic();
21
- useLayoutEffect(() => {
21
+ useEffect(() => {
22
22
  setRowHeight(getRowDomHeight(editor, row));
23
23
  }, [editor, row, tableSize]);
24
24
  const oldRowHeight = getRowDomHeight(editor, row);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "0.4.24",
3
+ "version": "0.4.27",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",