فهرست منبع

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

DEV-UNITY-6\Utilisateur 6 سال پیش
والد
کامیت
7234a2ac9b
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  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));