Skip to content

Conversation

@vanowm
Copy link
Contributor

@vanowm vanowm commented Jun 30, 2025

The || operator should not be used when setting default values when the value could be a 0 or an empty string. The default values should only be used if the data is undefined, otherwise trust the data sent by the server.

This is still not optimal solution, since we still have to maintain default values in multiple files.

The `||` operator should not be used when setting default numerical values when the value could be a `0`
The default values should only be used if the data is undefined, otherwise trust the data sent by the server.

This is still not optimal solution, since we still have to maintain default values in multiple files.
@vanowm
Copy link
Contributor Author

vanowm commented Jun 30, 2025

Fix for #69

@softwarecrash
Copy link
Contributor

allready fixed but not in a PR

@vanowm
Copy link
Contributor Author

vanowm commented Jun 30, 2025

I see it's fixed for one specific setting, but other non-boolean settings might have the same issue.

@softwarecrash
Copy link
Contributor

some values are defaulted by the types and settings

@softwarecrash
Copy link
Contributor

fixed like
softwarecrash@982e490

@vanowm
Copy link
Contributor Author

vanowm commented Jul 5, 2025

My OCD still cringes seeing default values scattered and behind conditions...

@softwarecrash
Copy link
Contributor

softwarecrash commented Jul 5, 2025

My OCD still cringes seeing default values scattered and behind conditions...

sure, but its only a fix not a refactoring.

so your version is much better, but on esp we have not unlimited space for lists and ohter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants