cleanup: Use object shorthand where possible
ES6 allows to omit property names where they match the name of the assigned variable, which makes code less redunant and thus cleaner. We will soon enforce that in our eslint rules, so make sure we use the shorthand wherever possible. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
9eaa0089d0
commit
c860409da5
@ -57,8 +57,7 @@ function _unpremultiply(color) {
|
||||
let red = Math.min((color.red * 255 + 127) / color.alpha, 255);
|
||||
let green = Math.min((color.green * 255 + 127) / color.alpha, 255);
|
||||
let blue = Math.min((color.blue * 255 + 127) / color.alpha, 255);
|
||||
return new Clutter.Color({ red: red, green: green,
|
||||
blue: blue, alpha: color.alpha });
|
||||
return new Clutter.Color({ red, green, blue, alpha: color.alpha });
|
||||
}
|
||||
|
||||
class AppMenu extends PopupMenu.PopupMenu {
|
||||
|
Reference in New Issue
Block a user