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', () => {
123
123
const getMatches = ( pathname : string ) =>
124
124
Promise . all (
125
125
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
126
128
// As we convert route modules to RR framework mode with lazy imports,
127
129
// more and more of the routes will have their handles defined inside the
128
130
// route module. We need to call the lazy function to import the module
129
131
// 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 ?.( ) ) }
131
133
return {
132
134
pathname : m . pathname ,
133
135
params : m . params ,
You can’t perform that action at this time.
0 commit comments