Skip to content

Commit

Permalink
fix: Check for nil
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewvincent committed Aug 18, 2024
1 parent 2cc37ed commit f04c36b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/mkdnflow/paths.lua
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ local truncate_path = function(oldpath, newpath)
char = char + 1
end
end
if char > last_slash then
if last_slash and char > last_slash then
difference = string.sub(newpath, last_slash)
else
difference = string.sub(newpath, char)
Expand Down

0 comments on commit f04c36b

Please sign in to comment.