Просмотр исходного кода

fix: new script is {} and doesn't have a name

tophf 4 лет назад
Родитель
Сommit
ce11df7899
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/options/views/edit/index.vue

+ 2 - 1
src/options/views/edit/index.vue

@@ -172,7 +172,8 @@ export default {
       };
     },
     scriptName() {
-      const scriptName = this.script && getScriptName(this.script);
+      const { script } = this;
+      const scriptName = script?.meta && getScriptName(script);
       store.title = scriptName;
       return scriptName;
     },