Uploaded image for project: 'BookBrainz'
  1. BookBrainz
  2. BB-352

Works with malformed identifier sets throw

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None

      Visiting http://localhost:9099/work/3fb95f66-3083-44cb-b64d-0f3c84024443 throws this error:

      ```
      Unhandled rejection TypeError: Cannot destructure property `identifiers` of 'undefined' or 'null'.
      at getISBNOfEdition (/Users/Lenore/Work/Brainz/BookBrainz/bookbrainz-site/lib/client/helpers/entity.js:290:34)
      at EditionTableRow (/Users/Lenore/Work/Brainz/BookBrainz/bookbrainz-site/lib/client/components/pages/entities/edition-table.js:62:15)
      ```

      In getISBNOfEdition, entity.identifierSet.identifiers can apparently be null, which throws an error.
      A check on the existence of entity.identifierSet.identifiers should be enough, but the entries should be fixed in the database

            panwarabhishek345 Abhishek Panwar
            mr_monkey Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package