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

Fix nuxeo-selectivity error during _dataChanged function

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.37, 3.1.13
    • Component/s: Widgets
    • Release Notes Summary:
      null check added in _dataChanged function so that it will not through error in console for nuxeo-selectivity
    • Backlog priority:
      700
    • Sprint:
      UI - 2024-10
    • Story Points:
      3

      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

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 week, 4 days, 1 hour
                  1w 4d 1h
                  Remaining:
                  Time Spent - 4 days Remaining Estimate - 1 week, 1 hour
                  1w 1h
                  Logged:
                  Time Spent - 4 days Remaining Estimate - 1 week, 1 hour
                  4d