Skip to content

Commit 5ce671e

Browse files
fix: handle input cancel
1 parent 0438864 commit 5ce671e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/rest-nvim/parser/init.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,9 @@ function parser.parse(node, source, ctx)
405405
prompt = (var_description or ("Enter value for `%s`"):format(var_name)) .. ": ",
406406
default = ctx:resolve(var_name),
407407
}, function (input)
408-
ctx:set_local(var_name, input)
408+
if input then
409+
ctx:set_local(var_name, input)
410+
end
409411
end)
410412
end
411413
elseif child_type == "variable_declaration" then

0 commit comments

Comments
 (0)