Browse Source

fix editor

Michael Wang 4 năm trước cách đây
mục cha
commit
3b04f99947
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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));