Ver Fonte

fixed a minor bug when there is no spellcasting attribute

Warafear há 10 meses atrás
pai
commit
ebb9f92b92

+ 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() +