Skip to content

Commit

Permalink
fix if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Doarakko committed Aug 21, 2024
1 parent 386b570 commit 71b2808
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 71b2808

Please sign in to comment.