[gnome-shell-extensions] cleanup: Use some more array destructuring



commit a1f38d818d26b0fad44042a1ddefea1fe290c43c
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Aug 11 02:08:38 2019 +0200

    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 a80e1a3..add57be 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]