From f815fdb37de99b42f53d1242ff1594946e33cfd1 Mon Sep 17 00:00:00 2001 From: lochstar Date: Wed, 19 Aug 2020 14:02:31 +1000 Subject: [PATCH] fix ripple error when using svg in button slot --- src/components/ripple/Ripple.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ripple/Ripple.js b/src/components/ripple/Ripple.js index 3ba4729dd..1f3593f83 100644 --- a/src/components/ripple/Ripple.js +++ b/src/components/ripple/Ripple.js @@ -54,7 +54,7 @@ function onAnimationEnd(event) { function getInk(el) { for (let i = 0; i < el.children.length; i++) { - if (el.children[i].className.indexOf('p-ink') !== -1) { + if (typeof el.children[i].className === 'string' && el.children[i].className.indexOf('p-ink') !== -1) { return el.children[i]; } } @@ -73,4 +73,4 @@ const Ripple = { } }; -export default Ripple; \ No newline at end of file +export default Ripple;