I have a filter with options as shown below which works perfect when browsing entries. However when I use this filter in a field with the fieldtype "entries" to select related articles it gives me the error as shown at the bottom of this issue.
Filter options:
{% for category in craft.categories.group('interests').all() %}
{{ ({
filter: {
relatedTo: {
element: category.id,
}
},
label: category.title
})|json_encode() }}{{ not loop.last ? ',' }}
{% endfor %}
Error code:
ElementFilters.js?v=1586255504:238 Uncaught TypeError: Cannot read property 'hasOwnProperty' of null
at ElementFilters.js?v=1586255504:238
at Array.forEach (<anonymous>)
at updateCriteriaValue (ElementFilters.js?v=1586255504:235)
at ElementFilters.js?v=1586255504:217
at Array.forEach (<anonymous>)
at updateCriteria (ElementFilters.js?v=1586255504:216)
at HTMLDivElement.filterHandler (ElementFilters.js?v=1586255504:286)

I have a filter with options as shown below which works perfect when browsing entries. However when I use this filter in a field with the fieldtype "entries" to select related articles it gives me the error as shown at the bottom of this issue.
Filter options:
Error code: