Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scryfall-google-sheets.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// this function is available here:
// https://github.com/scryfall/google-sheets/blob/main/scryfall-google-sheets.js
// and was last updated on 2021-01-08 (probably)
// and was last updated on 2022-10-18 (probably)

const MAX_RESULTS_ = 700; // a safe max due to Google Sheets timeout system

Expand Down Expand Up @@ -72,9 +72,9 @@ const SCRYFALL = (query, fields = "name", num_results = 150,
cards.splice(0, num_results).forEach(card => {
let row = [];

// there is probably a better way to handle card faces, but this is
// probably sufficient for the vast majority of use cases
// use front face of the card, but keeping the full name
if ("card_faces" in card) {
card["card_faces"][0]["name"] = card["name"];
Object.assign(card, card["card_faces"][0]);
}

Expand Down