소스 검색

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