[gnome-maps] contextMenu: Avoid double declaration with 'let'



commit 86d9d8ce3e31f3c937037691c96c6e98f79b93a2
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue Feb 14 18:59:03 2017 -0800

    contextMenu: Avoid double declaration with 'let'
    
    The following is a syntax error in ES6:
    
        let a = 'something';
        let a = 'other thing';
    
    Previously GJS would silently accept this, but in GJS 1.48.0 it will be
    a syntax error. This fixes the one instance where it happens. In this
    case the offending variable was a dummy variable in a destructuring
    assignment, so we can just elide the variable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=778645

 src/contextMenu.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 1941bb7..536813c 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -72,8 +72,8 @@ const ContextMenu = new Lang.Class({
     },
 
     _onButtonReleaseEvent: function(widget, event) {
-        let [_, button] = event.get_button();
-        let [_, x, y] = event.get_coords();
+        let [, button] = event.get_button();
+        let [, x, y] = event.get_coords();
         this._longitude = this._mapView.view.x_to_longitude(x);
         this._latitude = this._mapView.view.y_to_latitude(y);
 


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