Skip to content

Commit

Permalink
Force maindeck and sideboard to be {} not [] when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
bakert committed Oct 29, 2023
1 parent 09a0eda commit 5f9c219
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 5f9c219

Please sign in to comment.