Quick change I noticed while reading this for video work (I opened the wrong InputStateContainer). Simply removes the ternary and replaces it with a nullish coalescing operator.
Details
Details
Since dimensions is an object, the only cases it will fail the ternary check is if it's null or undefined (since the object has to be falsy to fail the ternary check).
According to the MDN docs:
The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined.
So this covers the same cases as the ternary, and is more concise.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable