File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -123,11 +123,13 @@ test('path builder', () => {
123123const getMatches = ( pathname : string ) =>
124124 Promise . all (
125125 matchRoutes ( routes , pathname ) ! . map ( async ( m ) => {
126+ // lazy can also be an object as of RR 7.5, but we never use it that way
127+ const lazy = typeof m . route . lazy === 'function' ? m . route . lazy : undefined
126128 // As we convert route modules to RR framework mode with lazy imports,
127129 // more and more of the routes will have their handles defined inside the
128130 // route module. We need to call the lazy function to import the module
129131 // contents and fill out the route object with it.
130- const route = { ...m . route , ...( await m . route . lazy ?.( ) ) }
132+ const route = { ...m . route , ...( await lazy ?.( ) ) }
131133 return {
132134 pathname : m . pathname ,
133135 params : m . params ,
You can’t perform that action at this time.
0 commit comments