mce 0.16.4 → 0.16.5

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -793,8 +793,10 @@ class Doc extends Node$1 {
793
793
  } else if (source) {
794
794
  if (Array.isArray(source) && source.length === 1) {
795
795
  _source = source[0];
796
+ } else {
797
+ _source = source;
796
798
  }
797
- if (!Array.isArray(_source)) {
799
+ if (_source && !Array.isArray(_source)) {
798
800
  if (_source.meta?.inEditorIs === "Doc") {
799
801
  id = _source.id;
800
802
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mce",
3
3
  "type": "module",
4
- "version": "0.16.4",
4
+ "version": "0.16.5",
5
5
  "description": "A headless infinite canvas editor framework built on WebGL rendering, supports exporting to image, video, and PPT. Only the ESM.",
6
6
  "author": "wxm",
7
7
  "license": "MIT",
@@ -61,7 +61,7 @@
61
61
  "diff": "^8.0.3",
62
62
  "file-saver": "^2.0.5",
63
63
  "lodash-es": "^4.17.23",
64
- "modern-canvas": "^0.15.3",
64
+ "modern-canvas": "^0.15.4",
65
65
  "modern-font": "^0.4.4",
66
66
  "modern-idoc": "^0.10.21",
67
67
  "modern-text": "^1.10.15",