You’re mixing two different conditional syntaxes here when you could have used 1. It took my brain a minute to even recognize you had a ternary inside the if statement body.
If you had instead used a chained ternary, it would have been much easier for me to read, because my brain wouldn’t need to context switch between syntax reading modes.
The “nested ternaries R bad” dogma is just wrong. I know a lot of people agree with it but I’m convinced that it’s familiarity bias. Chained ternaries are less common and for that main reason, people have less practice reading them.