3 ms·
It was fairly long series of checks, some complicated, and they mixed up an or and not case when merging them into the single if.
by Ensorceled 3y ago
It was fairly long series of checks, some complicated, and they mixed up an or and not case when merging them into the single if.
- throw1234651234 3y agoAh, I see now. I think it's a very common mistake. People also mess up negation when they refactor things like these. So your original was if(!loggedIn) return Unauthorized; if(isTokenExpired) return Unauthorized; etc? I think being that explicit about it works pretty well sometimes.