Wrapped ternary operator within parentheses as outlined in Code Style.

Comment From: sbrannen

This has been merged into 6.0.x and main.

Thanks

p.s. in the future, please do your best to include multiple related changes in a PR instead of submitting a PR that changes a single line of code. For example, if you'd found multiple places that did not wrap a ternary expression in parentheses, it would have been nice to address all of those together.