Bug Description
We see via sentry that the error Cannot read properties of null (reading 'item') happens in line
onItemToggle(e) {
this.fireEvent("item-toggle", { item: e.detail.item });
}
of @ui5/webcomponents/dist/List.js?:587:56
as in the onItemClose function above
onItemClose(e: CustomEvent<ListItemCloseEventDetail>) {
const target = e.target as UI5Element | null;
const shouldFireItemClose = target?.hasAttribute("ui5-li-notification") || target?.hasAttribute("ui5-li-notification-group");
if (shouldFireItemClose) {
this.fireDecoratorEvent("item-close", { item: e.detail?.item });
}
}
also contains a optional chaining in this case, I'm wondering if this might just be forgotten in onItemToggle
This was observed in 1.24.24, but it's also there in the latest version:
|
this.fireDecoratorEvent("item-toggle", { item: e.detail.item }); |
Affected Component
List
Expected Behaviour
no exception.
Isolated Example
No response
Steps to Reproduce
sorry, this is only an observation of what happens on customer side.
Log Output, Stack Trace or Screenshots
Priority
None
UI5 Web Components Version
1.24.24
Browser
Chrome
Operating System
No response
Additional Context
No response
Organization
No response
Declaration
Bug Description
We see via sentry that the error
Cannot read properties of null (reading 'item')happens in lineof @ui5/webcomponents/dist/List.js?:587:56
as in the onItemClose function above
also contains a optional chaining in this case, I'm wondering if this might just be forgotten in onItemToggle
This was observed in 1.24.24, but it's also there in the latest version:
webcomponents/packages/main/src/List.ts
Line 1422 in 9d4737f
Affected Component
List
Expected Behaviour
no exception.
Isolated Example
No response
Steps to Reproduce
sorry, this is only an observation of what happens on customer side.
Log Output, Stack Trace or Screenshots
Priority
None
UI5 Web Components Version
1.24.24
Browser
Chrome
Operating System
No response
Additional Context
No response
Organization
No response
Declaration