Make sure that blueprints with no slash is maintained when applied (#2085)

* Make sure that blueprints with no slash is maintained when applied

* Remove unneeded import
This commit is contained in:
Adam Hopkins
2021-03-23 02:28:42 +02:00
committed by GitHub
parent 4998fd54c0
commit dfd1787a49
3 changed files with 62 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ class RouteMixin:
# Fix case where the user did not prefix the URL with a /
# and will probably get confused as to why it's not working
if not uri.startswith("/"):
if not uri.startswith("/") and (uri or hasattr(self, "router")):
uri = "/" + uri
if strict_slashes is None: