@textbus/collaborate 4.0.0-alpha.43 → 4.0.0-alpha.44

Sign up to get free protection for your applications and to get access to all the features.
@@ -600,7 +600,11 @@ let Collaborate = class Collaborate {
600
600
  break;
601
601
  case 'insert':
602
602
  {
603
- const data = action.ref.map(item => {
603
+ const ref = action.ref;
604
+ if (!Array.isArray(ref)) {
605
+ throw collaborateErrorFn('The insertion action must have a reference value.');
606
+ }
607
+ const data = ref.map(item => {
604
608
  return this.createSharedModelByLocalModel(item);
605
609
  });
606
610
  sharedArray.insert(index, data);
package/bundles/index.js CHANGED
@@ -602,7 +602,11 @@ exports.Collaborate = class Collaborate {
602
602
  break;
603
603
  case 'insert':
604
604
  {
605
- const data = action.ref.map(item => {
605
+ const ref = action.ref;
606
+ if (!Array.isArray(ref)) {
607
+ throw collaborateErrorFn('The insertion action must have a reference value.');
608
+ }
609
+ const data = ref.map(item => {
606
610
  return this.createSharedModelByLocalModel(item);
607
611
  });
608
612
  sharedArray.insert(index, data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/collaborate",
3
- "version": "4.0.0-alpha.43",
3
+ "version": "4.0.0-alpha.44",
4
4
  "description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -26,8 +26,8 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@tanbo/stream": "^1.2.3",
29
- "@textbus/core": "^4.0.0-alpha.43",
30
- "@viewfly/core": "^1.0.0-alpha.1",
29
+ "@textbus/core": "^4.0.0-alpha.44",
30
+ "@viewfly/core": "^1.0.0-alpha.2",
31
31
  "reflect-metadata": "^0.1.13",
32
32
  "y-websocket": "^1.4.3",
33
33
  "yjs": "^13.6.14"
@@ -50,5 +50,5 @@
50
50
  "bugs": {
51
51
  "url": "https://github.com/textbus/textbus.git/issues"
52
52
  },
53
- "gitHead": "23f1cf769789b56e1fcbaa25655bd0dfd57a24f9"
53
+ "gitHead": "6f01d454a41a0ff0fa7ccde7a65c481dde3cff4c"
54
54
  }