浏览代码

fix editor

Michael Wang 4 年之前
父节点
当前提交
3b04f99947
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/VEditor/renderJSON.js

+ 1 - 1
src/components/VEditor/renderJSON.js

@@ -1,7 +1,7 @@
 // const _text_styles_ = ["bold", "underline", "italic", "sup", "sub"];
 
 export function renderRichText(body, container) {
-  let sections = body.sections || [];
+  let sections = body?.sections || [];
   let nodes = [];
   sections.forEach((section) => {
     nodes.push(renderSection(section));