فهرست منبع

removed undefined checks, as null is returned.

Matthias Uiberacker 7 سال پیش
والد
کامیت
3c215aa3a0
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/MusicalScore/ScoreIO/MusicSymbolModules/ExpressionReader.ts

+ 2 - 2
src/MusicalScore/ScoreIO/MusicSymbolModules/ExpressionReader.ts

@@ -143,12 +143,12 @@ export class ExpressionReader {
         if (n !== undefined) {
             let tempoAttr: IXmlAttribute = n.attribute("tempo");
             let dynAttr: IXmlAttribute = n.attribute("dynamics");
-            if (tempoAttr !== undefined) {
+            if (tempoAttr) {
                 let match: string[] = tempoAttr.value.match(/\d+/);
                 this.soundTempo = match !== undefined ? parseInt(match[0], 10) : 100;
                 isTempoInstruction = true;
             }
-            if (dynAttr !== undefined) {
+            if (dynAttr) {
                 let match: string[] = dynAttr.value.match(/\d+/);
                 this.soundDynamic = match !== undefined ? parseInt(match[0], 10) : 100;
                 isDynamicInstruction = true;