瀏覽代碼

No Ticket. toggleHistory now only calls getWindow once.

Aaron Newton 15 年之前
父節點
當前提交
12c12474fb
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      desktop/core/static/js/Source/JFrameFilters/CCS.JFrame.ToggleHistory.js

+ 2 - 2
desktop/core/static/js/Source/JFrameFilters/CCS.JFrame.ToggleHistory.js

@@ -28,8 +28,8 @@ CCS.JFrame.addGlobalFilters({
 
 
 	toggleHistory: function(container) {
 	toggleHistory: function(container) {
 		var win = this.getWindow();
 		var win = this.getWindow();
-		if (!win.history) return;
-		var defaultState = this.getWindow().options.displayHistory;
+		if (!win || !win.history) return;
+		var defaultState = win.options.displayHistory;
 		var history = win.history;
 		var history = win.history;
 		var hiding = container.get('html').contains('ccs-hide_history');
 		var hiding = container.get('html').contains('ccs-hide_history');
 		var showing = container.get('html').contains('ccs-show_history');
 		var showing = container.get('html').contains('ccs-show_history');