@@ -331,22 +331,22 @@ export class MediaDbSettingTab extends PluginSettingTab {
331331 const mediaTypeApiMap = new Map < string , string [ ] > ( ) ;
332332
333333 // Populate the map with APIs for each media type
334- Object . entries ( this . plugin . settings . apiToggle ) . forEach ( ( [ apiName , api ] ) => {
335- Object . entries ( api ) . forEach ( ( [ mediaType ] ) => {
334+ for ( const [ apiName , api ] of Object . entries ( this . plugin . settings . apiToggle ) ) {
335+ for ( const mediaType of Object . keys ( api ) ) {
336336 if ( ! mediaTypeApiMap . has ( mediaType ) ) {
337337 mediaTypeApiMap . set ( mediaType , [ ] ) ;
338338 }
339339 mediaTypeApiMap . get ( mediaType ) ! . push ( apiName ) ;
340- } ) ;
341- } ) ;
340+ }
341+ }
342342
343343 // Filter out media types with only one API
344344 const filteredMediaTypes = Array . from ( mediaTypeApiMap . entries ( ) ) . filter ( ( [ _ , apis ] ) => apis . length > 1 ) ;
345345
346346 // Dynamically create settings based on the filtered media types and their APIs
347- filteredMediaTypes . forEach ( ( [ mediaType , apis ] ) => {
347+ for ( const [ mediaType , apis ] of filteredMediaTypes ) {
348348 new Setting ( containerEl ) . setName ( `Select APIs for ${ unCamelCase ( mediaType ) } ` ) . setHeading ( ) ;
349- apis . forEach ( apiName => {
349+ for ( const apiName of apis ) {
350350 const apiToggle = this . plugin . settings . apiToggle [ apiName as keyof typeof this . plugin . settings . apiToggle ] ;
351351 new Setting ( containerEl )
352352 . setName ( apiName )
@@ -357,8 +357,8 @@ export class MediaDbSettingTab extends PluginSettingTab {
357357 void this . plugin . saveSettings ( ) ;
358358 } ) ;
359359 } ) ;
360- } ) ;
361- } ) ;
360+ }
361+ }
362362
363363 new Setting ( containerEl ) . setName ( 'New file location' ) . setHeading ( ) ;
364364 // region new file location
0 commit comments