stabilize values a little better
This commit is contained in:
parent
f1f7718b68
commit
96ee81f77d
13
index.js
13
index.js
|
@ -66,14 +66,17 @@ async function fetchLevels(sheet, platformer, pending) {
|
|||
if (!lastTier) continue;
|
||||
if (lastTier === 'Super Terrifying') break;
|
||||
|
||||
const enjoymentStr = enjoyment && enjoyment[0];
|
||||
const enjoymentParse = parseFloat(enjoymentStr || "");
|
||||
|
||||
const obj = {
|
||||
sheetIndex: parseInt(i),
|
||||
tier: lastTier,
|
||||
name: fruityLevels[level[0]] || level[0],
|
||||
creator: creator && creator[0],
|
||||
skillset: skillset && skillset[0],
|
||||
enjoyment: enjoyment && enjoyment[0],
|
||||
description: description && description[0],
|
||||
name: fruityLevels[level[0]] || level[0] || "",
|
||||
creator: creator && creator[0] || "",
|
||||
skillset: skillset && skillset[0] || "",
|
||||
enjoyment: !isNaN(enjoymentParse) ? enjoymentParse : null,
|
||||
description: description && description[0] || "",
|
||||
};
|
||||
|
||||
levelObjs.push(obj);
|
||||
|
|
Loading…
Reference in New Issue