[pve-devel] [PATCH manager 2/4] fix jslint errors

Dominik Csapak d.csapak at proxmox.com
Wed Jun 1 16:17:06 CEST 2016


jslint does not like mixing statements and function calls

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/panel/InputPanel.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/www/manager6/panel/InputPanel.js b/www/manager6/panel/InputPanel.js
index 9339eb4..e5afd9a 100644
--- a/www/manager6/panel/InputPanel.js
+++ b/www/manager6/panel/InputPanel.js
@@ -4,11 +4,15 @@ Ext.define('PVE.panel.InputPanel', {
     listeners: {
 	activate: function() {
 	    // notify owning container that it should display a help button
-	    this.onlineHelp && Ext.GlobalEvents.fireEvent('pveShowHelp', this.onlineHelp);
+	    if (this.onlineHelp) {
+		Ext.GlobalEvents.fireEvent('pveShowHelp', this.onlineHelp);
+	    }
 	},
 	deactivate: function() {
-	    this.onlineHelp && Ext.GlobalEvents.fireEvent('pveHideHelp', this.onlineHelp);
-	},
+	    if (this.onlineHelp) {
+		Ext.GlobalEvents.fireEvent('pveHideHelp', this.onlineHelp);
+	    }
+	}
     },
     border: false,
 
-- 
2.1.4





More information about the pve-devel mailing list