Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Execute after save sometimes the variable is undefine. #4528

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Dec 18, 2024

fix: Execute after save sometimes the variable is undefine.

@fit2bot fit2bot requested a review from a team December 18, 2024 11:14
@@ -222,7 +222,7 @@ export default {
callback: (value, form, btn) => {
form.value.run_after_save = true
const parameters = form.value.variable.reduce((acc, item) => {
acc[item.var_name] = item.default_value
acc[item.var_name] = item.default_value || ''
return acc
}, {})
form.value['parameters'] = parameters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There do not appear to be any specific issues or optimizations present in this snippet of code; it's well formatted and does what it's supposed to accomplish. The variables form, value and various function names have been declared with clear and concise syntaxes that make their purpose easily understandable.

The only change I notice is using the ternary operator (? :) instead of short circuits (??), which can improve readability depending on whether you prefer clarity over efficiency.

Here is a summary of my observations:

No major errors

Some stylistic improvements (using ternary operators)

No optimization concerns

Please review this for any other potential issues and request modifications if necessary.

@w940853815 w940853815 merged commit 5a26589 into dev Dec 18, 2024
5 of 6 checks passed
@w940853815 w940853815 deleted the pr@dev@perf_add_default_value_undefine branch December 18, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants