Fix bugs in platform data assignment

pull/59/head
MillenniumEarl 2020-12-17 23:05:22 +01:00
parent a769cf04fa
commit b2d49ffef4
1 changed files with 6 additions and 7 deletions

View File

@ -97,11 +97,7 @@ function _parseLatestPlatformHTML(html) {
*/
function _assignLatestPlatformData(data) {
// Local variables
const propertiesMap = {
"Engine": shared.engines,
"Status": shared.statuses,
"Other": shared.others,
};
const scrapedData = {};
// Extract and parse the data
const prefixes = data.prefixes.games.map(e => {
@ -118,10 +114,13 @@ function _assignLatestPlatformData(data) {
for (const e of p.data) dict[parseInt(e.id)] = e.name.replace("'", "'");
// Save the property
propertiesMap[p] = dict;
scrapedData[p.element] = dict;
}
// Parse the tags
// Save the values
shared.engines = scrapedData["Engines"];
shared.statuses = scrapedData["Status"];
shared.others = scrapedData["Other"];
shared.tags = data.tags;
}
//#endregion