mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Use this.getListArray to prevent extra conversions
This commit is contained in:
parent
b6ed198000
commit
a7e30e4a99
1 changed files with 4 additions and 4 deletions
|
|
@ -244,6 +244,8 @@ class BuildLists {
|
|||
const hasSaveMethod = listOptions.hasOwnProperty('beforeSave')
|
||||
const saveMethod = hasSaveMethod ? listOptions.beforeSave : listSet => Array.from( listSet )
|
||||
|
||||
|
||||
|
||||
// console.log('listFullPath', listFullPath)
|
||||
|
||||
const saveableList = saveMethod( this.lists[listOptions.name] )
|
||||
|
|
@ -396,7 +398,7 @@ class BuildLists {
|
|||
|
||||
const { errors } = await PromisePool
|
||||
.withConcurrency( poolSize )
|
||||
.for( Array.from( this.lists[listOptions.name] ) )
|
||||
.for( this.getListArray( listOptions.name ) )
|
||||
.process(async ( listEntry, index, pool ) => {
|
||||
// console.log('listEntry', listEntry)
|
||||
|
||||
|
|
@ -433,7 +435,7 @@ class BuildLists {
|
|||
|
||||
// Add device support
|
||||
if ( this.shouldHaveDeviceSupport( listEntry ) ) {
|
||||
const deviceList = Array.from( this.lists[ 'device' ] )
|
||||
const deviceList = this.getListArray( 'device' )
|
||||
|
||||
listEntry.deviceSupport = deviceList.map( device => {
|
||||
const supportsApp = deviceSupportsApp( device, listEntry )
|
||||
|
|
@ -458,8 +460,6 @@ class BuildLists {
|
|||
throw new Error( errors )
|
||||
}
|
||||
|
||||
// Array.from( this.lists[listOptions.name] )
|
||||
|
||||
// Count saved files
|
||||
const fileCount = fs.readdirSync( apiListDirectory ).length
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue