Skip to content

Commit

Permalink
fix type of version for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronDavidNewman committed May 4, 2024
1 parent caeacc3 commit 309bf5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/smo/data/score.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ export class SmoScore {
obj.metadata!.renumberingMap = JSON.parse(JSON.stringify(this.renumberingMap));
obj.metadata!.preferences = this.preferences.serialize();
obj.metadata!.scoreInfo = JSON.parse(JSON.stringify(this.scoreInfo));
if (typeof(obj?.metadata?.scoreInfo?.version) !== 'number'){
obj.metadata!.scoreInfo.version = 0;
}
if (this.formattingManager) {
obj.measureFormats = this.formattingManager.serialize();
}
Expand Down

0 comments on commit 309bf5c

Please sign in to comment.