fix(editor): Avoid infinite loops when resolving the expression {{ $parameter }} (no-changelog) (#6855)

Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-08-07 11:52:33 +02:00
committed by GitHub
parent adcf5a96e8
commit 8126181e18
3 changed files with 14 additions and 5 deletions

View File

@@ -657,11 +657,14 @@ export const workflowHelpers = defineComponent({
return null;
}
if (typeof returnData['__xxxxxxx__'] === 'object') {
const obj = returnData['__xxxxxxx__'];
if (typeof obj === 'object') {
const proxy = obj as { isProxy: boolean; toJSON?: () => unknown } | null;
if (proxy?.isProxy && proxy.toJSON) return JSON.stringify(proxy.toJSON());
const workflow = getCurrentWorkflow();
return workflow.expression.convertObjectValueToString(returnData['__xxxxxxx__'] as object);
return workflow.expression.convertObjectValueToString(obj as object);
}
return returnData['__xxxxxxx__'];
return obj;
},
async updateWorkflow(