1
0
Fork 0

fix(react): Units icon uses default style if no settings (#356)

Fixes a side effect of the "there are no longer default settings" change.

Fixes #344

Co-authored-by: Benjamin Fan <ben-git@swinglonga.com>
Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/356
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
Co-committed-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
This commit is contained in:
Benjamin Fan 2025-05-18 10:26:03 +00:00 committed by Joost De Cock
parent 7c796a689e
commit bdf8a40792

View file

@ -302,7 +302,7 @@ export const HeaderMenuDraftViewIcons = (props) => {
tooltip="Switches Units between metric and imperial (see Core Settings)"
>
<UnitsIcon
className={`${size} ${settings.units === accountUnits ? style.dflt : style.custom}`}
className={`${size} ${settings.units === accountUnits || typeof settings.units === 'undefined' ? style.dflt : style.custom}`}
/>
</Button>
) : null}