@seafile/comment-editor 1.0.16 → 1.0.17

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.
@@ -33,9 +33,12 @@ const SeafileCommentEditor = _ref => {
33
33
  settings,
34
34
  api
35
35
  } = _ref;
36
+ const mountedRef = (0, _react.useRef)(null);
36
37
  (0, _react.useEffect)(() => {
37
38
  _basicSdk.context.init(settings, api);
39
+ mountedRef.current = true;
38
40
  }, [settings, api]);
41
+ if (!mountedRef.current) return null;
39
42
  return /*#__PURE__*/_react.default.createElement(_basicSdk.CommentProvider, {
40
43
  type: type,
41
44
  className: className,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/comment-editor",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "private": false,
5
5
  "description": "This is a comment editor",
6
6
  "main": "dist/index.js",