diff --git a/src/App.vue b/src/App.vue index aea84fd..6359b9e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -173,10 +173,10 @@ export default defineComponent({ } else { let option = command.program === "custom" - ? command.customOptions - : this.programs[command.program]; - option.scptarg = command.scptarg; - option.charset = command.charset; + ? command.customOptions || {} + : this.programs[command.program] || {}; + option.scptarg = command.scptarg || ""; + option.charset = command.charset || {}; window.runCodeFile( commandCode, option, diff --git a/src/components/CommandRunResult.vue b/src/components/CommandRunResult.vue index a8c5856..e24e5ac 100644 --- a/src/components/CommandRunResult.vue +++ b/src/components/CommandRunResult.vue @@ -170,8 +170,8 @@ export default { getCommandOpt(command) { let option = command.program === "custom" - ? command.customOptions - : programs[command.program]; + ? command.customOptions || {} + : programs[command.program] || {}; option.scptarg = command.scptarg || ""; option.charset = command.charset || {}; option.envPath = this.$root.nativeProfile.envPath.trim() || "";