1
0
Fork 0

fix(react): Handle no-settings scenario

This commit is contained in:
Benjamin Fan 2025-05-22 08:17:34 -07:00 committed by Joost De Cock
parent 96ae664829
commit 743314062d

View file

@ -43,7 +43,7 @@ export const TestView = ({ Design, state, update, config }) => {
if (missingMeasurements(state)) return <Null />
const { settings } = state
if (settings.sample) {
if (settings?.sample) {
/*
* When testing/sampling one design, and then switching the editor to a different design,
* we run the risk that settings.sample holds invalid configuration. Like testing an unused