From ce5b4b13e485e9b46a64ff6ed850e29bf088c065 Mon Sep 17 00:00:00 2001
From: m1ga <migamiga@web.de>
Date: Mon, 12 Feb 2024 20:39:20 +0100
Subject: [PATCH] fix: optionDialog cancel option

---
 Alloy/commands/compile/parsers/Alloy.Abstract.Option.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Alloy/commands/compile/parsers/Alloy.Abstract.Option.js b/Alloy/commands/compile/parsers/Alloy.Abstract.Option.js
index 086138093..fbdafc29a 100644
--- a/Alloy/commands/compile/parsers/Alloy.Abstract.Option.js
+++ b/Alloy/commands/compile/parsers/Alloy.Abstract.Option.js
@@ -25,7 +25,7 @@ function parse(node, state, args) {
 
 	if (attrName) {
 		if (args.createArgs[attrName]) {
-			code = `${attrVarName} = ${codePush} - 1`;
+			code = `var ${attrVarName} = ${codePush} - 1`;
 		} else {
 			code = `${attrVarName} = undefined; ${codePush}`;
 		}