mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -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 hasSaveMethod = listOptions.hasOwnProperty('beforeSave')
|
||||||
const saveMethod = hasSaveMethod ? listOptions.beforeSave : listSet => Array.from( listSet )
|
const saveMethod = hasSaveMethod ? listOptions.beforeSave : listSet => Array.from( listSet )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// console.log('listFullPath', listFullPath)
|
// console.log('listFullPath', listFullPath)
|
||||||
|
|
||||||
const saveableList = saveMethod( this.lists[listOptions.name] )
|
const saveableList = saveMethod( this.lists[listOptions.name] )
|
||||||
|
|
@ -396,7 +398,7 @@ class BuildLists {
|
||||||
|
|
||||||
const { errors } = await PromisePool
|
const { errors } = await PromisePool
|
||||||
.withConcurrency( poolSize )
|
.withConcurrency( poolSize )
|
||||||
.for( Array.from( this.lists[listOptions.name] ) )
|
.for( this.getListArray( listOptions.name ) )
|
||||||
.process(async ( listEntry, index, pool ) => {
|
.process(async ( listEntry, index, pool ) => {
|
||||||
// console.log('listEntry', listEntry)
|
// console.log('listEntry', listEntry)
|
||||||
|
|
||||||
|
|
@ -433,7 +435,7 @@ class BuildLists {
|
||||||
|
|
||||||
// Add device support
|
// Add device support
|
||||||
if ( this.shouldHaveDeviceSupport( listEntry ) ) {
|
if ( this.shouldHaveDeviceSupport( listEntry ) ) {
|
||||||
const deviceList = Array.from( this.lists[ 'device' ] )
|
const deviceList = this.getListArray( 'device' )
|
||||||
|
|
||||||
listEntry.deviceSupport = deviceList.map( device => {
|
listEntry.deviceSupport = deviceList.map( device => {
|
||||||
const supportsApp = deviceSupportsApp( device, listEntry )
|
const supportsApp = deviceSupportsApp( device, listEntry )
|
||||||
|
|
@ -458,8 +460,6 @@ class BuildLists {
|
||||||
throw new Error( errors )
|
throw new Error( errors )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Array.from( this.lists[listOptions.name] )
|
|
||||||
|
|
||||||
// Count saved files
|
// Count saved files
|
||||||
const fileCount = fs.readdirSync( apiListDirectory ).length
|
const fileCount = fs.readdirSync( apiListDirectory ).length
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue