瀏覽代碼

fix(Chords): prevent undefined error

this.rules is used in this.calculateLabel().
sschmid 4 年之前
父節點
當前提交
2cff9981d8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/MusicalScore/Graphical/GraphicalChordSymbolContainer.ts

+ 1 - 1
src/MusicalScore/Graphical/GraphicalChordSymbolContainer.ts

@@ -18,8 +18,8 @@ export class GraphicalChordSymbolContainer extends GraphicalObject {
         super();
         this.chordSymbolContainer = chordSymbolContainer;
         this.boundingBox = new BoundingBox(this, parent);
-        this.calculateLabel(textHeight, transposeHalftones, keyInstruction);
         this.rules = rules;
+        this.calculateLabel(textHeight, transposeHalftones, keyInstruction);
     }
     public get GetChordSymbolContainer(): ChordSymbolContainer {
         return this.chordSymbolContainer;