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

Fixing logic in getIcon #965

Merged
merged 1 commit into from
Jan 3, 2021
Merged

Fixing logic in getIcon #965

merged 1 commit into from
Jan 3, 2021

Conversation

ofwinterpassed
Copy link

fixes #896

This fixes a logical error in the loop checking several alts to get the right icon. The old logic assigned "default" on each failure to find the right one. This made the loop fail on the next iteration unless default also was an object that contained the other alts looked for.

My fix changes the logic to use a default value for the name that should be used and assigns to that name if it finds the value. Finally it assigns to format_icons once it either found the one we're looking for or nothing was found.

@Alexays
Copy link
Owner

Alexays commented Jan 3, 2021

Thanks!

@Alexays Alexays merged commit 1f62082 into Alexays:master Jan 3, 2021
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.

Battery module doesn't work with format-icons object
2 participants