xiv-character-cards
Advanced tools
Comparing version
@@ -334,3 +334,3 @@ const fetch = require('node-fetch'); | ||
const deityPromise = dataPromise.then(data => loadImage(`https://xivapi.com/${data.Character.GuardianDeity.Icon}`)); | ||
const gcRankPromise = dataPromise.then(data => data.Character.GrandCompany.Company != null ? loadImage(`https://xivapi.com/${data.Character.GrandCompany.Rank.Icon}`) : null); | ||
const gcRankPromise = dataPromise.then(data => data.Character.GrandCompany.Company != null && data.Character.GrandCompany.Company.Name != null ? loadImage(`https://xivapi.com/${data.Character.GrandCompany.Rank.Icon}`) : null); | ||
const fcCrestPromise = dataPromise.then(data => data.Character.FreeCompanyName != null ? this.createCrest(data.FreeCompany.Crest) : null); | ||
@@ -446,6 +446,6 @@ | ||
if (Minions != null) { | ||
const minionsPercentage = Math.ceil(((Minions.length ?? 0) / this.minionCount) * 100); | ||
minionsPercentage = Math.ceil(((Minions.length ?? 0) / this.minionCount) * 100); | ||
} | ||
if (Mounts != null) { | ||
const mountsPercentage = Math.ceil(((Mounts.length ?? 0) / this.mountCount) * 100); | ||
mountsPercentage = Math.ceil(((Mounts.length ?? 0) / this.mountCount) * 100); | ||
} | ||
@@ -474,3 +474,3 @@ | ||
if (Character.GrandCompany.Company != null) { | ||
if (Character.GrandCompany.Company != null && Character.GrandCompany.Company.Name != null) { | ||
ctx.font = small; | ||
@@ -477,0 +477,0 @@ ctx.fillStyle = primary; |
{ | ||
"name": "xiv-character-cards", | ||
"description": "API to create fancy cards for FFXIV characters based on their Lodestone data, hosted at https://ffxiv-character-cards.herokuapp.com.", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"main": "create-card.js", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/xivapi/XIV-Character-Cards.git", |
3319946
-90.94%93
-50.53%