[gnome-weather] Avoid double declaration with 'let'



commit 39c65724bef050561fb605f29019bc60669710ec
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue Feb 14 17:11:54 2017 -0800

    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=778641

 src/app/window.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/app/window.js b/src/app/window.js
index aaf27f5..8eb0499 100644
--- a/src/app/window.js
+++ b/src/app/window.js
@@ -218,7 +218,7 @@ const MainWindow = new Lang.Class({
 
         let copyright = 'Copyright 2013-2015 The Weather Developers';
         let attribution = this._cityView.info ? this._cityView.info.get_attribution() : '';
-        let copyright = copyright + (attribution ? '\n' + attribution : '');
+        copyright += attribution ? '\n' + attribution : '';
         let aboutDialog = new Gtk.AboutDialog(
             { artists: artists,
               authors: [ 'Giovanni Campagna <gcampagna src gnome org>' ],


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