Omit health/sanity properties when their value is '-'

I'm not really sure about this one, but that's what the ArkhamDB JSON
schema suggests
This commit is contained in:
Adam Goldsmith 2021-09-08 22:39:13 -04:00
parent c024c8b8a8
commit f13c2d8295
1 changed files with 2 additions and 2 deletions

View File

@ -118,11 +118,11 @@ function build_card(component) {
};
var raw_health = component.settings.get('Stamina');
if (raw_health && raw_health != 'None') {
if (raw_health && raw_health != 'None' && raw_health != '-') {
card_data.health = int_or_null(raw_health);
}
var raw_sanity = component.settings.get('Sanity');
if (raw_sanity && raw_sanity != 'None') {
if (raw_sanity && raw_sanity != 'None' && raw_sanity != '-') {
card_data.sanity = int_or_null(raw_sanity);
}