@seafile/sdoc-editor 0.1.52 → 0.1.53

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.
@@ -54,20 +54,17 @@ export var decorateOperation = function decorateOperation(editor, operation) {
54
54
  }
55
55
  case OPERATION.SET_NODE:
56
56
  {
57
- var _properties = newOperation.properties,
58
- newProperties = newOperation.newProperties;
59
- if (!_properties.id) _properties.id = slugid.nice();
60
- // newProperties none has id attribute, keep the original id
61
- newProperties.id = _properties.id;
62
- newOperation['node_id'] = _properties.id; // the node which will be set to another type
57
+ var _path5 = newOperation.path;
58
+ var _node5 = Node.get(editor, _path5);
59
+ newOperation['node_id'] = _node5.id; // the node which will be set to another type
63
60
  break;
64
61
  }
65
62
  case OPERATION.MOVE_NODE:
66
63
  {
67
- var _path5 = newOperation.path;
68
- var _node5 = Node.get(editor, _path5);
64
+ var _path6 = newOperation.path;
65
+ var _node6 = Node.get(editor, _path6);
69
66
  // move operation not change the node's id
70
- newOperation['node_id'] = _node5.id; // moved node's id
67
+ newOperation['node_id'] = _node6.id; // moved node's id
71
68
  break;
72
69
  }
73
70
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",