瀏覽代碼

[fix] title

wenliming 2 年之前
父節點
當前提交
ba7ab21117
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/view/iframe/publish/tool-box/child/editor.vue

+ 2 - 1
src/view/iframe/publish/tool-box/child/editor.vue

@@ -146,7 +146,8 @@ const getTitleByHtmlStr = (str = '') => {
   let tag_end = '</title>'
   let index1 = str.indexOf(tag_start) + tag_start.length;
   let index2 = str.indexOf(tag_end);
-  if (index1 < 0 || index2 < 0) {
+  
+  if (index1 < tag_start.length || index2 < 0) {
     return '';
   }