Bladeren bron

fixed a minor bug when there is no spellcasting attribute

Warafear 10 maanden geleden
bovenliggende
commit
ebb9f92b92
1 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. 6 1
      src/app/journal/journal-stats/ability-panel/spellslots/spellslots.component.ts

+ 6 - 1
src/app/journal/journal-stats/ability-panel/spellslots/spellslots.component.ts

@@ -80,7 +80,12 @@ export class SpellslotsComponent {
   }
 
   private subscribeToAttribute(): void {
-    if (this.spellcastingAttribute !== undefined) {
+    if (
+      this.spellcastingAttribute !== undefined &&
+      this.spellcastingAttribute !== null
+    ) {
+      console.log(this.spellcastingAttribute);
+
       const command =
         'this.dataAccessor.' +
         this.spellcastingAttribute.toLowerCase() +