dev commit
[brisk.git] / web / prefs.js
index 415bdc6..314c90e 100644 (file)
@@ -82,19 +82,21 @@ function prefs_apply(prefs_new, is_update, is_volat)
             tra.show_noauth();
         }
 
-        if (prefs.listen != l_list_isol && prefs_new.listen == l_list_isol) {
-            if (standup_data_old != null) {
-                standup_data_notisol = standup_data_old.slice();
+        if (typeof(prefs) != "undefined") {
+            if (prefs.listen != l_list_isol && prefs_new.listen == l_list_isol) {
+                if (standup_data_old != null) {
+                    standup_data_notisol = standup_data_old.slice();
+                }
             }
-        }
-        else if (prefs.listen == l_list_isol && prefs_new.listen != l_list_isol) {
-            if (standup_data_notisol != null) {
-                standup_data_old = standup_data_notisol;
-                standup_data_notisol = null;
+            else if (prefs.listen == l_list_isol && prefs_new.listen != l_list_isol) {
+                if (standup_data_notisol != null) {
+                    standup_data_old = standup_data_notisol;
+                    standup_data_notisol = null;
+                }
             }
         }
         
-        if (true) {
+        if (g_prefs.listen != prefs_new.listen) {
             // ricalculation of standup area
             g_prefs.listen = prefs_new.listen;