@seafile/sdoc-editor 1.0.202 → 1.0.203

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.
@@ -51,7 +51,7 @@ const AddLinkDialog = _ref => {
51
51
  setLinkErrorMessage(t('The_link_address_is_invalid'));
52
52
  return;
53
53
  }
54
- const isEdit = oldURL && oldTitle;
54
+ const isEdit = oldURL || oldTitle;
55
55
  if (isEdit) {
56
56
  (0, _helpers.updateLink)(editor, title, url);
57
57
  } else {
@@ -100,7 +100,7 @@ const AddLinkDialog = _ref => {
100
100
  type: "url",
101
101
  className: "form-control",
102
102
  id: "addLink",
103
- value: url,
103
+ value: url || '',
104
104
  onChange: handleUrlChange
105
105
  }), linkErrorMessage && /*#__PURE__*/_react.default.createElement(_reactstrap.Alert, {
106
106
  color: "danger",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.202",
3
+ "version": "1.0.203",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",