Skip to content

Commit a5b059e

Browse files
authored
Make restart opts optional (#900)
1 parent 7319607 commit a5b059e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/dap.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ end
696696

697697

698698
function M.restart(config, opts)
699-
local lsession = opts.session or session
699+
local lsession = opts and opts.session or session
700700
if not lsession then
701701
notify('No active session', vim.log.levels.INFO)
702702
return
@@ -712,7 +712,7 @@ function M.restart(config, opts)
712712
end)
713713
else
714714
terminate(lsession, nil, nil, vim.schedule_wrap(function()
715-
local nopts = vim.deepcopy(opts)
715+
local nopts = vim.deepcopy(opts) or {}
716716
nopts.new = true
717717
M.run(config, nopts)
718718
end))

0 commit comments

Comments
 (0)