File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,12 @@ def _render_page(self, match: RouteMatch) -> bool:
108108 self ._render_error (e )
109109 return True
110110
111- # NOTE: if the full path could not be consumed, the deepest sub pages element must handle the possible 404
112- if match .remaining_path and not any (isinstance (el , SubPages ) for el in self .descendants ()):
113- if asyncio .iscoroutine (result ):
114- result .close ()
115- return False
111+ if not asyncio .iscoroutine (result ):
112+ # NOTE: if the full path could not be consumed, the deepest sub pages element must handle the possible 404
113+ if match .remaining_path and not any (isinstance (el , SubPages ) for el in self .descendants ()):
114+ if asyncio .iscoroutine (result ):
115+ result .close ()
116+ return False
116117
117118 self ._handle_scrolling (match , behavior = 'instant' )
118119 if asyncio .iscoroutine (result ):
You can’t perform that action at this time.
0 commit comments