Skip to content

Commit e153325

Browse files
fix(report): use .includes instead of strict equality to handle close button with multiple classes (#2427)
Co-authored-by: Tom Brunet <thbrunet@us.ibm.com>
1 parent dc1cbdb commit e153325

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

report-react/src/SavedReport.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ const filteredReport = {
329329
while (tgt && tgt.nodeName.toLowerCase() !== "button") {
330330
tgt = tgt.parentElement;
331331
}
332-
if (tgt && tgt.getAttribute("class") === "cds--modal-close") {
332+
if (tgt && tgt.getAttribute("class")?.includes("cds--modal-close")) {
333333
this.clearItem();
334334
evt.preventDefault();
335335
return false;

0 commit comments

Comments
 (0)