Skip to content

Commit 31c1e3a

Browse files
committed
refactor: compare child and nextChild on hasSameChildren
1 parent 9d06d5a commit 31c1e3a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/react-flicking/src/react-flicking/Flicking.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,7 @@ class Flicking extends React.Component<Partial<FlickingProps & FlickingOptions>>
266266
const same = prevChildren.every((child, idx) => {
267267
const nextChild = nextChildren[idx];
268268

269-
if (child.key && nextChild.key) {
270-
return child.key === nextChild.key && Object.keys(child.props).every(key => child.props[key] === nextChild.props[key]);
271-
} else {
272-
return child === nextChild;
273-
}
269+
return child === nextChild;
274270
});
275271

276272
return same;

0 commit comments

Comments
 (0)