Fix tags saving as empty object/Set

This commit is contained in:
Sam Carlton 2021-04-24 15:09:48 -05:00
parent 41c0457fcd
commit f53e81eb8e

View file

@ -107,7 +107,7 @@ async function fetchBundleGenres () {
} }
function generateTagsFromGenres( bundleId, bundleGenres ) { function generateTagsSetFromGenres( bundleId, bundleGenres ) {
// If we don't have this bundleID // If we don't have this bundleID
// then return empty // then return empty
if ( !bundleGenres.has( bundleId ) ) return [] if ( !bundleGenres.has( bundleId ) ) return []
@ -186,7 +186,7 @@ export default async function () {
// console.log('appScan', appScan) // console.log('appScan', appScan)
const tags = generateTagsFromGenres( appScan.bundleIdentifier, bundleGenres ) const tags = generateTagsSetFromGenres( appScan.bundleIdentifier, bundleGenres )
// Add to scanned app list // Add to scanned app list
scanListMap.set( appSlug, { scanListMap.set( appSlug, {
@ -207,7 +207,7 @@ export default async function () {
category: { category: {
slug: 'uncategorized' slug: 'uncategorized'
}, },
tags, tags: Array.from(tags),
relatedLinks relatedLinks
}) })
}) })