From 32370545cbcc2d7a3141a6ab3fd19ecb94ccc8d6 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Tue, 23 Feb 2021 09:50:54 +0100 Subject: [PATCH] Fix variable assignment in yaml parsing loop --- BTCPayServer/Views/Apps/TemplateEditor.cshtml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/BTCPayServer/Views/Apps/TemplateEditor.cshtml b/BTCPayServer/Views/Apps/TemplateEditor.cshtml index c145798fe..214a12438 100644 --- a/BTCPayServer/Views/Apps/TemplateEditor.cshtml +++ b/BTCPayServer/Views/Apps/TemplateEditor.cshtml @@ -188,12 +188,10 @@ $(function() { // Split products from the template for (var kl in lines) { - var line = lines[kl], - product = line.split("\n"), - id, price, title, description, image = null, - custom, buyButtonText, inventory=null, paymentMethods = []; - - var goingThroughMethods = false; + var line = lines[kl], product = line.split("\n"), goingThroughMethods = false, + id = null, price = null, title = null, description = null, image = null, + custom = null, buyButtonText = null, inventory = null, paymentMethods = []; + for (var kp in product) { var productProperty = product[kp].trim();