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:
- 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.
- 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.