Explorar o código

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

DEV-UNITY-6\Utilisateur %!s(int64=6) %!d(string=hai) anos
pai
achega
7234a2ac9b
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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));