@seafile/seafile-editor 2.0.44 → 2.0.45-beta

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.
@@ -169,10 +169,17 @@ const transformBlockquote = node => {
169
169
  return {
170
170
  id: _slugid.default.nice(),
171
171
  type: _elementTypes.BLOCKQUOTE,
172
- children: children.map(child => {
172
+ children: Array.isArray(children) && children.length > 0 ? children.map(child => {
173
173
  const handler = elementHandlers[child.type];
174
- return handler(child);
175
- }).flat() // flat
174
+ return handler(child); // flat
175
+ }).flat() : [{
176
+ id: _slugid.default.nice(),
177
+ type: _elementTypes.PARAGRAPH,
178
+ children: [{
179
+ id: _slugid.default.nice(),
180
+ text: ''
181
+ }]
182
+ }]
176
183
  };
177
184
  };
178
185
  exports.transformBlockquote = transformBlockquote;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "2.0.44",
3
+ "version": "2.0.45-beta",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {