1
0
Fork 0

fix (react): make the Sample menu less strict about translations

It can be helpful to be able to use the sample function on incomplete designs without proper translation, so don't crash if an option is missing its translation
This commit is contained in:
Jonathan Haas 2025-05-22 10:29:24 +02:00 committed by Joost De Cock
parent bfc2296cec
commit 9c3155823c

View file

@ -88,7 +88,7 @@ const SampleOptionButton = ({ name, i18n, update }) => (
onClick={() => update.settings('sample', { type: 'option', option: name })}
>
<BeakerIcon className="tw:w-5 tw:h-5" />
<span>{i18n.en.o[name].t}</span>
<span>{i18n.en?.o[name]?.t ?? name}</span>
</button>
)