Skip to content

Commit

Permalink
Merge pull request #79 from Doarakko/topic/update-api-format
Browse files Browse the repository at this point in the history
fix if condition
  • Loading branch information
Doarakko authored Aug 21, 2024
2 parents ebf9bcf + 71b2808 commit 7882cea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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.

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

0 comments on commit 7882cea

Please sign in to comment.