mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-07 13:34:08 +08:00
修复生成代码时,对是否具有输出变量判断错误的BUG
This commit is contained in:
parent
ce098f5d75
commit
3f9b4fc642
@ -49,8 +49,9 @@ export function generateCode(flow) {
|
||||
|
||||
let cmdCode = cmd.code;
|
||||
// 处理输出变量
|
||||
if (cmd.outputVariable) {
|
||||
const { name, details } = cmd.outputVariable;
|
||||
const outputVariable = cmd.outputVariable || {};
|
||||
const { name, details } = outputVariable;
|
||||
if (name || !window.lodashM.isEmpty(details)) {
|
||||
if (cmd.asyncMode === "then") {
|
||||
// 使用回调函数模式
|
||||
if (cmd.callbackFunc) {
|
||||
@ -136,7 +137,5 @@ export function generateCode(flow) {
|
||||
|
||||
export function generateFlowsCode(flows) {
|
||||
const [mainFlow, ...subFlows] = flows;
|
||||
return [...subFlows, mainFlow]
|
||||
.map((flow) => generateCode(flow))
|
||||
.join("\n\n");
|
||||
return [...subFlows, mainFlow].map((flow) => generateCode(flow)).join("\n\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user