瀏覽代碼

add try block for settings tab

CauseFX 6 年之前
父節點
當前提交
8e8bfbdbe9
共有 1 個文件被更改,包括 9 次插入 和 5 次删除
  1. 9 5
      js/cbpFWTabs.js

+ 9 - 5
js/cbpFWTabs.js

@@ -40,11 +40,15 @@
 		// current index
 		this.current = -1;
 		// show current content item
-        if(this.tabs[0].innerHTML.indexOf('#settings') >= 0){
-            this._show(5);
-        }else{
-            this._show();
-        }
+		try{
+			if(this.tabs[0].innerHTML.indexOf('#settings') >= 0){
+				this._show(5);
+			}else{
+				this._show();
+			}
+		}catch{
+			this._show();
+		}
 		// init events
 		this._initEvents();
 	};