From a1f38d818d26b0fad44042a1ddefea1fe290c43c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 11 Aug 2019 02:08:38 +0200 Subject: [PATCH] cleanup: Use some more array destructuring Array destructuring has been supported by gjs/mozjs for quite some time, so we are already using it heavily where it makes sense. However one place still sneaked through where using destructuring makes sense, as the element's position has semantic meaning (instead of just making it the first, second, ... element). https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91 --- extensions/places-menu/placeDisplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js index a80e1a3b..add57bec 100644 --- a/extensions/places-menu/placeDisplay.js +++ b/extensions/places-menu/placeDisplay.js @@ -495,7 +495,7 @@ var PlacesManager = class { for (let i = 0; i < lines.length; i++) { let line = lines[i]; let components = line.split(' '); - let bookmark = components[0]; + let [bookmark] = components; if (!bookmark) continue;