=BG= minor - avoid if statement to make code clearer.

Can you set a local variable with the visibility first, then just set it (instead of the ternary inline with the assignment)?