Преглед на файлове

fixed a minor bug when there is no spellcasting attribute

Warafear преди 10 месеца
родител
ревизия
ebb9f92b92
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  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() +