File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,7 @@ export function DynamicNav({
132132 rootBits . forEach ( bit => {
133133 entity = currentTree . find ( n => n . name === bit ) ;
134134 if ( ! entity ) {
135- // eslint-disable-next-line no-console
136- console . warn ( `Could not find entity at ${ root } (specifically at ${ bit } )` ) ;
137- return ;
135+ throw new Error ( `Could not find entity at ${ root } (specifically at ${ bit } )` ) ;
138136 }
139137 currentTree = entity . children ;
140138 } ) ;
@@ -147,9 +145,7 @@ export function DynamicNav({
147145 const parentNode = entity . children ?. find ( ( n : EntityTree ) => n . name === '' ) ;
148146
149147 if ( ! parentNode ) {
150- // eslint-disable-next-line no-console
151- console . warn ( `Could not find parentNode at ${ root } ` ) ;
152- return null ;
148+ throw new Error ( `Could not find parentNode at ${ root } ` ) ;
153149 }
154150
155151 const { path} = serverContext ( ) ;
You can’t perform that action at this time.
0 commit comments