Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Doarakko committed Aug 21, 2024
1 parent 71b2808 commit 3e4ab91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ async function run() {
return response.json();
})
.then((data) => {
if (!(Array.isArray(data) && data.length > 0)) {
if (!(('data' in data) && Array.isArray(data["data"]) && data["data"].length > 0)) {
throw new Error("Failed to get card");
}
const card = data[0];
const card = data["data"][0];
const cardName = card.name;
if (!(('card_images' in card) && Array.isArray(card.card_images) && card.card_images.length > 0)) {
throw new Error("Failed to get card images");
Expand Down

0 comments on commit 3e4ab91

Please sign in to comment.