Skip to content

Commit

Permalink
fix(stacks): handle nil frame.source (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga authored Apr 11, 2021
2 parents 6732ec5 + eca38ab commit 341df70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/dapui/elements/stacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Element:render_frames(frames, render_state, indent)
render_state:add_match("DapUIFrameName", line_no, #new_line + 1, #frame.name)
new_line = new_line .. frame.name .. " "

local source_name = vim.fn.fnamemodify(frame.source.path, ":.")
local source_name = frame.source and vim.fn.fnamemodify(frame.source.path, ":.") or 'NO SOURCE'
if vim.startswith(source_name, ".") then
source_name = frame.source.path
end
Expand Down

0 comments on commit 341df70

Please sign in to comment.