Skip to content

Commit

Permalink
fix(react): fix issue with checking children
Browse files Browse the repository at this point in the history
fixes #6064
  • Loading branch information
nolimits4web committed Sep 15, 2022
1 parent 532fdfe commit 37a94ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/react/get-children.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

function isChildSwiperSlide(child) {
return child.type && child.type.displayName.includes('SwiperSlide');
return child.type && child.type.displayName && child.type.displayName.includes('SwiperSlide');
}

function processChildren(c) {
Expand Down

0 comments on commit 37a94ea

Please sign in to comment.