]> git.proxmox.com Git - pve-manager.git/commitdiff
check earlier if the logview is destroyed
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 15 Feb 2017 13:55:50 +0000 (14:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 9 Mar 2017 09:44:43 +0000 (10:44 +0100)
because extjs 6.2 handles destroying of components differently (namely
asynchronous), we have to check earlier if the view is destroyed, else
we get a 'cannot access ~ of undefined' error

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/panel/LogView.js

index 5b64dec7f07356e82925293a9046b158c2fad8f5..4be7c50f6f59ab7987ed3f78c7121c45dc8a6f35 100644 (file)
@@ -39,12 +39,13 @@ Ext.define('PVE.panel.LogView', {
 
     updateView: function(start, end, total, text) {
         var me = this;
-       var el = me.dataCmp.el;
 
        if (me.destroyed) { // return if element is not there anymore
            return;
        }
 
+       var el = me.dataCmp.el;
+
        if (me.viewInfo && me.viewInfo.start === start &&
            me.viewInfo.end === end && me.viewInfo.total === total &&
            me.viewInfo.textLength === text.length) {