]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
fix undefined access on acme variable
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 6 May 2020 17:11:12 +0000 (19:11 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 6 May 2020 17:11:13 +0000 (19:11 +0200)
We have 4 call sites of that, one had a fallback - the other three
was totally unchecked and triggered already exceptions on panel
render ... -.-

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/Parser.js
www/manager6/node/ACME.js

index 20d81d4a52a1ab5af94f1c5aaa2de23978efc1f7..9fa71cf0d11ea6067d1667d40d182e032f8a1339 100644 (file)
@@ -14,7 +14,7 @@ Ext.define('PVE.Parser', { statics: {
 
     parseACME: function(value) {
        if (!value) {
-           return;
+           return {};
        }
 
        var res = {};
index 33159b2e63c21603a5e37988d8a5f79614083f04..fbc9086d4a36c38a3940c5510c69752e37dd7446 100644 (file)
@@ -205,7 +205,7 @@ Ext.define('PVE.node.ACMEDomainEdit', {
                };
 
                let configkey = olddomain.configkey;
-               let acmeObj = PVE.Parser.parseACME(nodeconfig.acme) || {};
+               let acmeObj = PVE.Parser.parseACME(nodeconfig.acme);
 
                if (values.type === 'dns') {
                    if (!olddomain.configkey || olddomain.configkey === 'acme') {