Bugsounet Coding

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    Solved Cache album.id throws exception

    Issues
    2
    3
    57
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • doctorfree
      doctorfree last edited by

      I was debugging another issue and noticed errors in the dev console with MMM-GoogleAssistant when it was setting the album cover background image. The album it was using to access a cached album id was undefined. So accessing the id property of this undefined object threw an exception.

      Is this something wrong with my cache?

      I modified components/extented.js at line 714 to check if the album was undefined:

      if (typeof album != 'undefined') {
          albumCover.style.backgroundImage = `url(modules/MMM-GoogleAssistant/tmp/cache/${album.id})`
      }
      

      This got rid of the dev console errors but why is it trying to access an undefined album object?

      @doctorfree

      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by bugsounet

        Good question…
        I don’t catch any error about album because it’s not logical to don’t have any picture…

        But … it can 😕

        thanks for this report !

        1 Reply Last reply Reply Quote -1
        • bugsounet
          bugsounet Main Coder last edited by

          hi, It will be patched with GA v3.3.X

          1 Reply Last reply Reply Quote 0
          • Topic has been marked as solved  bugsounet bugsounet 
          • First post
            Last post
          Powered by NodeBB | @bugsounet ©2022