소스 검색

refactor: take min value for gte check

refactor to 47734879482a89068286cbd79f63b00db46ebff4

we don't use min_value here anyways because of the Given check, but this is cleaner.
sschmid 5 년 전
부모
커밋
2fc728f92c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/MusicalScore/ScoreIO/MusicSheetReader.ts

+ 1 - 1
src/MusicalScore/ScoreIO/MusicSheetReader.ts

@@ -571,7 +571,7 @@ export class MusicSheetReader /*implements IMusicSheetReader*/ {
                     const creditJustify: string = creditChild.attribute("justify")?.value;
                     const creditY: string = creditChild.attribute("default-y")?.value;
                     const creditYGiven: boolean = creditY !== undefined && creditY !== null;
-                    const creditYInfo: number = creditYGiven ? parseFloat(creditY) : -1;
+                    const creditYInfo: number = creditYGiven ? parseFloat(creditY) : Number.MIN_VALUE;
                     if (creditYGiven && creditYInfo > systemYCoordinates) {
                         if (!this.musicSheet.Title) {
                             const creditSize: string = creditChild.attribute("font-size").value;