Skip to content

Commit 25761da

Browse files
Matthieu Coudronteto
authored andcommitted
fix: error when run_request is run without { verbose = XXX }
we should actually merge opts with a default dict so that we can reference keys without having to check if they exist (TODO)
1 parent 867cde3 commit 25761da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/rest-nvim/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rest.run = function(verbose)
2222
return
2323
end
2424

25-
return rest.run_request(result, verbose)
25+
return rest.run_request(result, { verbose = verbose })
2626
end
2727

2828
-- run will retrieve the required request information from the current buffer
@@ -65,7 +65,7 @@ rest.run_request = function(req, opts)
6565
raw = config.get("skip_ssl_verification") and vim.list_extend(result.raw, { "-k" })
6666
or result.raw,
6767
body = result.body,
68-
dry_run = opts.verbose or false,
68+
dry_run = opts.verbose,
6969
bufnr = result.bufnr,
7070
start_line = result.start_line,
7171
end_line = result.end_line,

0 commit comments

Comments
 (0)