Переглянути джерело

fix Settings save to actually save data localstrage

master
isymchych 9 роки тому
джерело
коміт
f449bc34d8
1 змінених файлів з 7 додано та 5 видалено
  1. 7
    5
      modules/settings/Settings.js

+ 7
- 5
modules/settings/Settings.js Переглянути файл

32
             this.confSettings = JSON.parse(window.localStorage.getItem(conferenceID));
32
             this.confSettings = JSON.parse(window.localStorage.getItem(conferenceID));
33
         if(!this.confSettings.jitsiMeetId) {
33
         if(!this.confSettings.jitsiMeetId) {
34
             this.confSettings.jitsiMeetId = generateUniqueId();
34
             this.confSettings.jitsiMeetId = generateUniqueId();
35
-            logger.log("generated id",
36
-                this.confSettings.jitsiMeetId);
35
+            logger.log("generated id", this.confSettings.jitsiMeetId);
37
             this.save();
36
             this.save();
38
         }
37
         }
39
         if (!this.confSettings.callStatsUserName) {
38
         if (!this.confSettings.callStatsUserName) {
55
 }
54
 }
56
 
55
 
57
 Settings.prototype.save = function () {
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
 Settings.prototype.setDisplayName = function (newDisplayName) {
64
 Settings.prototype.setDisplayName = function (newDisplayName) {
63
     this.displayName = newDisplayName;
65
     this.displayName = newDisplayName;

Завантаження…
Відмінити
Зберегти