Переглянути джерело

fix(Chords): prevent undefined error

this.rules is used in this.calculateLabel().
sschmid 4 роки тому
батько
коміт
2cff9981d8

+ 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;