Fix crash for relative links

This commit is contained in:
Christoph Hagen 2023-02-22 11:47:26 +01:00
parent 5f5c250272
commit 1b6441e03e

View File

@ -431,7 +431,7 @@ extension Element {
// Find the common elements of the path, which can be discarded
var index = 0
while pageParts[index] == ownParts[index] {
while index < pageParts.count && index < ownParts.count && pageParts[index] == ownParts[index] {
index += 1
}
// The relative path needs to go down to the first common folder,