index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
-rw-r--r-- | src/modules/record_sheet.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/record_sheet.js b/src/modules/record_sheet.js index 4d8aada..78dbace 100644 --- a/src/modules/record_sheet.js +++ b/src/modules/record_sheet.js @@ -41,7 +41,7 @@ function createIcon(number) { function createRecord(unit) { const { dataset: { allegiance, number }} = unit, primaryWeapon = unit.querySelector('.primary-weapon'), - pw = primaryWeapon.getAttribute('href').replace('#', ''), + pw = primaryWeapon?.getAttribute('href').replace('#', '') || 'rifle', div = document.createElement('div', { is: 'soldier-record-block' }), spans = Array(5).fill('span').map(t => document.createElement(t)), [tn, pwt, pwd, pwrs, pwrl] = spans; |