cleanup: Avoid unnecessary parentheses
Extra parentheses usually add noise rather than clarity, so avoid them. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
ebf77748a8
commit
e44adb92cf
@ -79,7 +79,7 @@ function findMatchingSlash(expr, offset) {
|
||||
// findMatchingBrace("[(])", 3) returns 1.
|
||||
function findMatchingBrace(expr, offset) {
|
||||
let closeBrace = expr.charAt(offset);
|
||||
let openBrace = ({ ')': '(', ']': '[' })[closeBrace];
|
||||
let openBrace = { ')': '(', ']': '[' }[closeBrace];
|
||||
|
||||
return findTheBrace(expr, offset - 1, openBrace, closeBrace);
|
||||
}
|
||||
|
Reference in New Issue
Block a user