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
@ -121,7 +121,7 @@ function trySpawn(argv) {
|
||||
// We are only interested in the part in the parentheses. (And
|
||||
// we can't pattern match the text, since it gets localized.)
|
||||
let message = err.message.replace(/.*\((.+)\)/, '$1');
|
||||
throw new (err.constructor)({ code: err.code, message });
|
||||
throw new err.constructor({ code: err.code, message });
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
@ -329,7 +329,7 @@ function lowerBound(array, val, cmp) {
|
||||
max = mid;
|
||||
}
|
||||
|
||||
return (min == max || cmp(array[min], val) < 0) ? max : min;
|
||||
return min == max || cmp(array[min], val) < 0 ? max : min;
|
||||
}
|
||||
|
||||
// insertSorted:
|
||||
|
Reference in New Issue
Block a user