@seafile/sdoc-editor 1.0.212-alph-0.1.6 → 1.0.212-alph-0.1.8

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.
@@ -76,13 +76,11 @@ const SDocOutline = _ref => {
76
76
  }, t('Headings_you_add_to_the_document_will_appear_here')), list.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
77
77
  className: "sdoc-outline-list-container"
78
78
  }, !isSdocRevision && list.map((item, index) => {
79
- console.log(item, index);
80
79
  return /*#__PURE__*/_react.default.createElement(_outlineItem.default, {
81
80
  key: index,
82
81
  item: item
83
82
  });
84
83
  }), isSdocRevision && list.map((item, index) => {
85
- console.log(item, index);
86
84
  return /*#__PURE__*/_react.default.createElement(_outlineItem.default, {
87
85
  key: index,
88
86
  item: item,
@@ -100,11 +100,14 @@ class OutlineItem extends _react.default.PureComponent {
100
100
  ...(child.delete && _constants2.DELETED_STYLE),
101
101
  backgroundColor: child.computed_background_color || undefined
102
102
  };
103
+ const key = child.id;
103
104
  const content = /*#__PURE__*/_react.default.createElement("span", {
104
105
  style: style,
105
- key: child.id || child.text
106
+ key: key
106
107
  }, text);
107
- return child.delete ? /*#__PURE__*/_react.default.createElement("del", null, content) : content;
108
+ return child.delete ? /*#__PURE__*/_react.default.createElement("del", {
109
+ key: key
110
+ }, content) : content;
108
111
  }));
109
112
  }
110
113
  }
@@ -39,7 +39,7 @@ const getTopLevelChanges = changes => {
39
39
  } else {
40
40
  var _dom4, _dom4$dataset;
41
41
  dom = parentNode;
42
- if ((_dom4 = dom) !== null && _dom4 !== void 0 && (_dom4$dataset = _dom4.dataset) !== null && _dom4$dataset !== void 0 && _dom4$dataset.id && !dom.classList.contain('table-cell')) break;
42
+ if ((_dom4 = dom) !== null && _dom4 !== void 0 && (_dom4$dataset = _dom4.dataset) !== null && _dom4$dataset !== void 0 && _dom4$dataset.id && !dom.classList.contains('table-cell')) break;
43
43
  }
44
44
  }
45
45
  topLevelChanges.push(dom.dataset.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.212-alph-0.1.6",
3
+ "version": "1.0.212-alph-0.1.8",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",