Browse Source

Merge branch 'dev_1.1.5' of https://git.yishihui.com/DeNet/de-net into dev_1.1.5

nieyuge 2 years ago
parent
commit
05882671a2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/view/iframe/publish/tool-box/child/editor.vue

+ 3 - 0
src/view/iframe/publish/tool-box/child/editor.vue

@@ -142,6 +142,9 @@ const searchHandler = async () => {
 const getTitleByHtmlStr = (str) => {
   let index1 = str.indexOf('<title>') + 7;
   let index2 = str.indexOf('</title>');
+  if(index2 < 0) {
+    return '';
+  }
   return str.substring(index1, index2) || '';
 };