-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simplify main.js #2913
simplify main.js #2913
Conversation
Change the "if" statment to two simple statements.
Not sure if this is an improvement. |
@Trott thoughts? I personally don't think this is an improvement. |
I appreciate the desire to improve the code but I think the existing code is more maintainable. It's easier to understand, at least to me. @MaledongGit Is there something in particular about the existing code that makes it problematic that you were hoping to improve? |
This change reduces repetition. I find the current code difficult to read as the duplication makes the intent of the code harder to understand. The variable name also makes it easier to understand. |
This whole thing is like premature optimization. I honestly don't see any real benefit from this patch. The code works fine, and we don't even have to get into if |
Change the "if" statment to two simple statements.