Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1657

Fix nuxeo-selectivity error during _dataChanged function

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.x, 3.0.x
    • Component/s: Widgets

      Description

      Usage of nuxeo-selectivity element in layouts such as nuxeo-home results in an error when the _dataChanged observer function is called, for example after a page refresh.

      Steps to Reproduce:

      1. Create or modify an existing layout to use a nuxeo-selectivity element whose data is refreshed upon a certain trigger e.g. clicking the home button or refreshing the page - example layout nuxeo-home.html containing a nuxeo-selectivity that lists the user's Collections attached.
      2. Navigate to the layout and trigger a data refresh.

      Expected behavior: nuxeo-selectivity displays current data

      Actual behavior: nuxeo-selectivity displays current data, but in the browser console log an error is reported:

      Uncaught (in promise) TypeError: Cannot read properties of null (reading 'some')
      

      this._selectivity.getData() returns null while _dataChanged is resolving. This is not an issue in LTS 2019 as _dataChanged does not access the inner _selectivity data.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hmiskaryan Henry Miskaryan
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: