We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ac4480 commit 888573aCopy full SHA for 888573a
1 file changed
lib/keyframes.js
@@ -74,13 +74,14 @@ export default class Keyframes extends React.Component {
74
requestNextFrame () {
75
this.waitForDelay(() => {
76
const frameNum = this.state.frameNum + 1;
77
- const loopNum = this.state.loopNum + 1;
78
if (this.props.children.length <= frameNum) {
79
- if (this.props.loop === true || this.props.loop === 'infinite' || loopNum < this.props.loop) {
+ if (this.props.loop === true || this.props.loop === 'infinite' || this.state.loopNum < this.props.loop) {
80
this.setState({
81
frameNum: 0,
82
- loopNum
+ loopNum: this.state.loopNum + 1
83
});
+ this.requestNextFrame();
84
+ return;
85
} else {
86
this.props.onEnd();
87
return;
0 commit comments