diff --git a/src/components/CommandEditor.vue b/src/components/CommandEditor.vue index 5841af2..9fbaee1 100644 --- a/src/components/CommandEditor.vue +++ b/src/components/CommandEditor.vue @@ -214,7 +214,8 @@ export default { ? this.$utools.getDB(this.$utools.DBPRE.CFG + "preferences") ?.codeHistory[this.action.type] : this.action.data; - Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo)); + quickCommandInfo?.program && + Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo)); // monaco 相关 this.$refs.editor.setEditorValue(this.quickcommandInfo.cmd); this.setLanguage(this.quickcommandInfo.program);