cleanup: Use default parameters where appropriate

Since ES6 it is possible to set an explicit default value for optional
parameters (overriding the implicit value of 'undefined'). Use them
for a nice small cleanup.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626
This commit is contained in:
Florian Müllner
2019-07-12 01:31:38 +02:00
committed by Georges Basile Stavracas Neto
parent 16ca7a21a7
commit 404bc34089
9 changed files with 9 additions and 32 deletions

View File

@ -1416,7 +1416,7 @@ var AppFolderPopup = class AppFolderPopup {
Signals.addSignalMethods(AppFolderPopup.prototype);
var AppIcon = class AppIcon {
constructor(app, iconParams) {
constructor(app, iconParams = {}) {
this.app = app;
this.id = app.get_id();
this.name = app.get_name();
@ -1442,9 +1442,6 @@ var AppIcon = class AppIcon {
this.actor._delegate = this;
if (!iconParams)
iconParams = {};
// Get the isDraggable property without passing it on to the BaseIcon:
let appIconParams = Params.parse(iconParams, { isDraggable: true }, true);
let isDraggable = appIconParams['isDraggable'];