Quellcode durchsuchen

Merge pull request #15 from isymchych/fix-auth-dialog

fix Settings.save to actually save data to localstrage
master
Paweł Domas vor 9 Jahren
Ursprung
Commit
f7edc370ce
1 geänderte Dateien mit 7 neuen und 5 gelöschten Zeilen
  1. 7
    5
      modules/settings/Settings.js

+ 7
- 5
modules/settings/Settings.js Datei anzeigen

@@ -32,8 +32,7 @@ function Settings(conferenceID) {
32 32
             this.confSettings = JSON.parse(window.localStorage.getItem(conferenceID));
33 33
         if(!this.confSettings.jitsiMeetId) {
34 34
             this.confSettings.jitsiMeetId = generateUniqueId();
35
-            logger.log("generated id",
36
-                this.confSettings.jitsiMeetId);
35
+            logger.log("generated id", this.confSettings.jitsiMeetId);
37 36
             this.save();
38 37
         }
39 38
         if (!this.confSettings.callStatsUserName) {
@@ -55,9 +54,12 @@ function Settings(conferenceID) {
55 54
 }
56 55
 
57 56
 Settings.prototype.save = function () {
58
-    if(!supportsLocalStorage())
59
-        window.localStorage.setItem(this.conferenceID, JSON.stringify(this.confSettings));
60
-}
57
+    if (supportsLocalStorage()) {
58
+        window.localStorage.setItem(
59
+            this.conferenceID, JSON.stringify(this.confSettings)
60
+        );
61
+    }
62
+};
61 63
 
62 64
 Settings.prototype.setDisplayName = function (newDisplayName) {
63 65
     this.displayName = newDisplayName;

Laden…
Abbrechen
Speichern