Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Mar 6, 2024
1 parent 9f91e00 commit cd4ffdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/routers/guidance_.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_breadcrumbs(path):
def handleGuidanceRedirects(url_path, redirects):
for redirect in redirects:
url_path_copy = url_path
if url_path_copy[-1] == "/":
if len(url_path_copy) > 0 and url_path_copy[-1] == "/":
url_path_copy = url_path_copy[:-1]
if redirect["from"] == url_path_copy:
return RedirectResponse(url=redirect["to"], status_code=301)
Expand Down

0 comments on commit cd4ffdb

Please sign in to comment.