Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'getAbsoluteTimestamp' of undefined #679

Closed
Jack-Works opened this issue Feb 27, 2020 · 1 comment
Assignees

Comments

@Jack-Works
Copy link

Jack-Works commented Feb 27, 2020

e.Compare = function(t, e) {
    var n = l.Fraction.minus(t.staffEntries[t.staffEntries.length - 1].getAbsoluteTimestamp(), t.staffEntries[0].getAbsoluteTimestamp())
                                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    , i = l.Fraction.minus(e.staffEntries[e.staffEntries.length - 1].getAbsoluteTimestamp(), e.staffEntries[0].getAbsoluteTimestamp());
     return n.RealValue > i.RealValue ? 1 : i.RealValue > n.RealValue ? -1 : 0
}

Error stack:

Uncaught TypeError: Cannot read property 'getAbsoluteTimestamp' of undefined
    at e.Compare (opensheetmusicdisplay@0.7.3:15)
    at Array.sort (<anonymous>)
    at e.calculateSlurs (opensheetmusicdisplay@0.7.3:15)
    at e.t.calculateMusicSystems (opensheetmusicdisplay@0.7.3:8)
    at e.t.calculate (opensheetmusicdisplay@0.7.3:8)
    at t.reCalculate (opensheetmusicdisplay@0.7.3:15)
    at t.render (opensheetmusicdisplay@0.7.3:15)
    at opensheetmusicdisplay@0.7.3:15

When try to render Piano Sonata No. 14 in C♯ minor (“Moonlight”) (it's a public sheet, free to download)

@sschmidTU sschmidTU self-assigned this Mar 3, 2020
@sschmidTU
Copy link
Contributor

sschmidTU commented Apr 14, 2020

Fixed, will be released in OSMD 0.7.4a soon.
The moonlight sonata sample renders now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants