fix: handle no-path scenario
This commit is contained in:
parent
59d8cff1da
commit
8f77c3f7bf
1 changed files with 4 additions and 0 deletions
|
|
@ -106,6 +106,10 @@ class InstalledExtensionMiddleware:
|
|||
self.app = app
|
||||
|
||||
async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
|
||||
if not "path" in scope:
|
||||
await self.app(scope, receive, send)
|
||||
return
|
||||
|
||||
path_elements = scope["path"].split("/")
|
||||
if len(path_elements) > 2:
|
||||
_, path_name, path_type, *rest = path_elements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue