dekkerglen / CubeCobra

An open source web application for building, managing, and playtesting Magic the Gathering cubes.
https://www.cubecobra.com
Apache License 2.0
193 stars 120 forks source link

Fix error when exporting to MTGO format when the cube contains a maybeboard #2476

Open KaelenProctor opened 3 weeks ago

KaelenProctor commented 3 weeks ago

Fixes #2446

Main problem was lack of cardIndex.cardID || cards[cardIndex].cardID in the maybeboard export lines, hence the additional consolidation into a helper function.

Edit: Also found that the "Show other" sorting flag was being passed to sortForDownload as a string instead of a boolean (eg "true" or "false"), such that it was always being treated as truthy