[gnome-shell/gnome-3-38] credentialManager: Shut up a JS warning



commit 279d5035713da1fcd6c393b4512102112053020e
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 28 20:26:18 2020 +0100

    credentialManager: Shut up a JS warning
    
    Plain classes are private to their file, so accessing them from
    another module results in the following warning:
    
        That property was defined with 'let' or 'const' inside the module.
        This was previously supported, but is not correct according to the
        ES6 standard.
    
    Fix by assigning the class to a public variable instead.
    
    (Eventually switching to ES6 modules with proper imports/exports will
    fix this as well)
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1512>
    
    (cherry picked from commit ef807619e96a562ca74de0950e67a7a3e49b650b)

 js/gdm/credentialManager.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/credentialManager.js b/js/gdm/credentialManager.js
index cf001f4e42..5c4bc7e62a 100644
--- a/js/gdm/credentialManager.js
+++ b/js/gdm/credentialManager.js
@@ -1,7 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 /* exported CredentialManager */
 
-class CredentialManager {
+var CredentialManager = class CredentialManager {
     constructor(service) {
         this._token = null;
         this._service = service;
@@ -21,4 +21,4 @@ class CredentialManager {
     get service() {
         return this._service;
     }
-}
+};


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