File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -152,24 +152,24 @@ export function Component(props: MenuProps) {
152152 const moduleFromPath = ( key : string ) : ( commonStorage . Module | null ) => {
153153 let foundModule = null ;
154154
155- modules . forEach ( ( module ) => {
156- if ( key == module . modulePath ) {
157- foundModule = module ;
155+ if ( project ) {
156+ if ( key == project . modulePath ) {
157+ foundModule = project ;
158158 return foundModule ;
159159 }
160- module . mechanisms . forEach ( ( mechanism ) => {
160+ project . mechanisms . forEach ( ( mechanism ) => {
161161 if ( key == mechanism . modulePath ) {
162162 foundModule = mechanism ;
163163 return foundModule ;
164164 }
165165 } ) ;
166- module . opModes . forEach ( ( opmode ) => {
166+ project . opModes . forEach ( ( opmode ) => {
167167 if ( key == opmode . modulePath ) {
168168 foundModule = opmode ;
169169 return foundModule ;
170170 }
171171 } ) ;
172- } ) ;
172+ }
173173
174174 return foundModule ;
175175 } ;
You can’t perform that action at this time.
0 commit comments