Update directive data keyword

This commit is contained in:
mertsincan 2023-07-06 13:24:34 +01:00
parent 89c2d63b6a
commit 95c2dcd54b
3 changed files with 7 additions and 12 deletions

View file

@ -91,13 +91,7 @@ const Ripple = BaseRipple.extend('ripple', {
event.currentTarget.setAttribute('data-p-ink-active', 'false');
},
getInk(el) {
for (let i = 0; i < el.children.length; i++) {
if (el.children[i].getAttribute('data-pc-name') === 'ripple') {
return el.children[i];
}
}
return null;
return el && el.children ? [...el.children].find((child) => DomHandler.getAttribute(child, 'data-pd-ripple')) : undefined;
}
}
});