Conditional fix

Extracted conditional operations to local variables in order to make statement more explicit and resolve a bug where the latter operation was unintentionally being included in the former's `is()`.  

FWIW, I'm not a fan of the `unless-or`, but reversing the variables and using an `if-and` doesn't work when `view` is `Window`.