Skip to content

Commit

Permalink
Merge pull request #568 from PennyDreadfulMTG/object-sideboard
Browse files Browse the repository at this point in the history
Force maindeck and sideboard to be {} not [] when empty
  • Loading branch information
bakert authored Oct 29, 2023
2 parents 09a0eda + bb07cdf commit ebf84a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gatherling/api_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ function repr_json_deck($deck)
if ($deck->id != 0) {
$json['found'] = 1;
$json = populate($json, $deck, ['playername', 'name', 'archetype', 'notes']);
$json['maindeck'] = $deck->maindeck_cards;
$json['sideboard'] = $deck->sideboard_cards;
$json['maindeck'] = (object) $deck->maindeck_cards;
$json['sideboard'] = (object) $deck->sideboard_cards;
} else {
$json['found'] = 0;
}
Expand Down

0 comments on commit ebf84a4

Please sign in to comment.