Skip to content

Commit f04c36b

Browse files
committed
fix: Check for nil
1 parent 2cc37ed commit f04c36b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/mkdnflow/paths.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ local truncate_path = function(oldpath, newpath)
457457
char = char + 1
458458
end
459459
end
460-
if char > last_slash then
460+
if last_slash and char > last_slash then
461461
difference = string.sub(newpath, last_slash)
462462
else
463463
difference = string.sub(newpath, char)

0 commit comments

Comments
 (0)