ESLint is telling me this error message inside my JS module: error no-unneeded-ternary Unnecessary use of conditional expression for default assignment
You don't need a ternary when a simple val || defaultVal will do.
val || defaultVal