From dfc88f766904524b3537460ff89262b7f5d9f65e Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Mon, 28 Feb 2022 22:31:52 +0000 Subject: [PATCH] Cleaner access of proxy for domain imports --- src/nginxconfig/util/import_data.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nginxconfig/util/import_data.js b/src/nginxconfig/util/import_data.js index 2465e77..79e402e 100644 --- a/src/nginxconfig/util/import_data.js +++ b/src/nginxconfig/util/import_data.js @@ -104,12 +104,12 @@ export default (query, domains, global, nextTick) => new Promise(resolve => { } // Create a new domain (assume it has had custom user settings) - const domainImported = clone(Domain.delegated); + // Push transforms the object to a proxy, so re-fetch the proxy from the array + const domainImported = domains[domains.push(clone(Domain.delegated)) - 1]; domainImported.hasUserInteraction = true; - domains.push(domainImported); // Apply the initial values on the next Vue tick, once the watchers are ready - nextTick(() => applyCategories(data.domains[i], domains[domains.length - 1])); + nextTick(() => applyCategories(data.domains[i], domainImported)); } } else { // If no configured domains, add a single default