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

Exception when refreshing the Album and Artist pages #230

Closed
kingosticks opened this issue Feb 16, 2017 · 0 comments · Fixed by #231
Closed

Exception when refreshing the Album and Artist pages #230

kingosticks opened this issue Feb 16, 2017 · 0 comments · Fixed by #231

Comments

@kingosticks
Copy link
Member

Uncaught TypeError: Cannot read property 'library' of undefined
    at Object.showArtist (http://localhost:6681/musicbox_webclient/js/library.js:281:19)
    at locationHashChanged (http://localhost:6681/musicbox_webclient/js/gui.js:402:25)
    at Object.trigger (http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:3:11522)
    at http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:3:18895
    at Function.each (http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:2:2881)
    at n.fn.init.each (http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:2:846)
    at n.fn.init.trigger (http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:3:18871)
    at n.fn.init.a.fn.(anonymous function) [as hashchange] (http://localhost:6681/musicbox_webclient/vendors/jquery_mobile/jquery.mobile-1.3.2.min.js:2:13015)
    at HTMLDocument.<anonymous> (http://localhost:6681/musicbox_webclient/js/gui.js:437:15)
    at i (http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:2:27451)
    at Object.fireWith [as resolveWith] (http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:2:28215)
    at Function.ready (http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:2:30008)
    at HTMLDocument.K (http://localhost:6681/musicbox_webclient/vendors/jquery/jquery-1.12.0.min.js:2:30370)

Steps to reproduce:

  • Navigate to an Artist or Album listing by selecting "Show artist"/"Show album" from the popup menu or from the search results.
  • Refresh the page

Have not looked to see when this was introduced. Not sure of the best way to fix it either. My first guess would be to track the connection state via an isConnected variable and check it before trying to access mopidy.library in showArtist and showAlbum. There is probably a more elegant way...

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