瀏覽代碼

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