Browse Source

//add a safe mode alert when we switch for TS from JS and vice et versa

DEV-UNITY-6\Utilisateur 6 years ago
parent
commit
7234a2ac9b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Playground/js/main.js

+ 4 - 0
Playground/js/main.js

@@ -295,6 +295,8 @@ class Main {
                 if (this.parent.settingsPG.ScriptLanguage == "JS") {
                     this.parent.settingsPG.ScriptLanguage = "TS";
                     location.reload();
+                    //revert in case the reload is cancel due to safe mode
+                    this.parent.settingsPG.ScriptLanguage = "JS";
                 }
             }
            
@@ -307,6 +309,8 @@ class Main {
                 if (this.parent.settingsPG.ScriptLanguage == "TS") {
                     this.parent.settingsPG.ScriptLanguage = "JS";
                     location.reload();
+                    //revert in case the reload is cancel due to safe mode
+                    this.parent.settingsPG.ScriptLanguage = "TS";
                 }
             }
         }.bind(this));