File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,30 +184,22 @@ export class RouterExplorer {
184184 str [ str . length - 1 ] === '/' ? str . slice ( 0 , str . length - 1 ) : str ;
185185
186186 const isRequestScoped = ! instanceWrapper . isDependencyTreeStatic ( ) ;
187- const module = this . container . getModuleByKey ( moduleKey ) ;
188-
189- if ( isRequestScoped ) {
190- const handler = this . createRequestScopedHandler (
191- instanceWrapper ,
192- requestMethod ,
193- module ,
194- moduleKey ,
195- methodName ,
196- ) ;
187+ const proxy = isRequestScoped
188+ ? this . createRequestScopedHandler (
189+ instanceWrapper ,
190+ requestMethod ,
191+ this . container . getModuleByKey ( moduleKey ) ,
192+ moduleKey ,
193+ methodName ,
194+ )
195+ : this . createCallbackProxy (
196+ instance ,
197+ targetCallback ,
198+ methodName ,
199+ moduleKey ,
200+ requestMethod ,
201+ ) ;
197202
198- paths . forEach ( path => {
199- const fullPath = stripSlash ( basePath ) + path ;
200- routerMethod ( stripSlash ( fullPath ) || '/' , handler ) ;
201- } ) ;
202- return ;
203- }
204- const proxy = this . createCallbackProxy (
205- instance ,
206- targetCallback ,
207- methodName ,
208- moduleKey ,
209- requestMethod ,
210- ) ;
211203 paths . forEach ( path => {
212204 const fullPath = stripSlash ( basePath ) + path ;
213205 routerMethod ( stripSlash ( fullPath ) || '/' , proxy ) ;
You can’t perform that action at this time.
0 commit comments