I want to add a ternary operator to add a class:
className={clsx(classes.text, {
classes.textSmall]: children.length > 11,
})}
This works but I get a TypeScript error:
Object is possibly 'null' or 'undefined'. TS2533
I'm not sure what can be improved here. Would anyone be able to point me in the right direction?
nullorundefined? Is itclassesorchildren?