@seafile/sdoc-editor 0.1.99 → 0.1.100

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.
@@ -8,7 +8,10 @@ export var commentDecorate = function commentDecorate(editor) {
8
8
  path = _ref2[1];
9
9
  var decorations = [];
10
10
  var comments = ((_editor$element_comme = editor.element_comments_map) === null || _editor$element_comme === void 0 ? void 0 : _editor$element_comme[node.id]) || [];
11
- if (comments && comments.length > 0) {
11
+ var unresolvedComments = comments && comments.filter(function (item) {
12
+ return !item.resolved;
13
+ });
14
+ if (unresolvedComments && unresolvedComments.length > 0) {
12
15
  var decoration = {
13
16
  anchor: {
14
17
  path: path,
@@ -21,7 +24,7 @@ export var commentDecorate = function commentDecorate(editor) {
21
24
  };
22
25
  // rgba prevents occlusion of the cursor
23
26
  decoration['computed_bg_color'] = 'rgba(129, 237, 247, 0.5)';
24
- decoration['comment_count'] = editor.element_comments_map[node.id].length;
27
+ decoration['comment_count'] = unresolvedComments === null || unresolvedComments === void 0 ? void 0 : unresolvedComments.length;
25
28
  decorations.push(decoration);
26
29
  }
27
30
  return decorations;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "0.1.99",
3
+ "version": "0.1.100",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",