]> git.proxmox.com Git - pmg-gui.git/commitdiff
jslint: empty block
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 28 Sep 2017 11:45:46 +0000 (13:45 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Sep 2017 12:42:52 +0000 (14:42 +0200)
reverse logic of if block to avoid empty block

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/MainView.js

index 207b27399aa45c9df6882a870e1481154b5a3cdc..79e48dace11f5baa645efb3e9edf599baa4e63ed 100644 (file)
@@ -35,12 +35,11 @@ Ext.define('PMG.MainView', {
                subpath = subpath || 0;
                if (lastpanel.getActiveTab) {
                    // we assume lastpanel is a tabpanel
-                   if (lastpanel.getActiveTab().getItemId() === subpath) {
-                       // we are already there
-                   } else {
+                   if (lastpanel.getActiveTab().getItemId() !== subpath) {
                        // set the active tab
                        lastpanel.setActiveTab(subpath);
                    }
+                   // else we are already there
                }
                action.stop();
                return;