Przeglądaj źródła

fix: changed undefined check to work also for null

Matthias Uiberacker 5 lat temu
rodzic
commit
12766fbf63

+ 1 - 1
src/MusicalScore/ScoreIO/MusicSymbolModules/SlurReader.ts

@@ -20,7 +20,7 @@ export class SlurReader {
                         let slurNumber: number = 1;
                         try {
                             const slurNumberAttribute: IXmlAttribute = slurNode.attribute("number");
-                            if (slurNumberAttribute !== undefined) {
+                            if (slurNumberAttribute) {
                                 slurNumber = parseInt(slurNode.attribute("number").value, 10);
                             }
                         } catch (ex) {