Skip to content

Commit 568f7df

Browse files
committed
remove i
1 parent 3cc5de7 commit 568f7df

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/QueueAnim.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ class QueueAnim extends React.Component {
225225

226226
enterBegin(key, elements) {
227227
elements.forEach((elem) => {
228+
elem.className += (' ' + this.props.animatingClassName[0]);
228229
const currentClassName = this.props.animatingClassName[1];
229-
const reg = new RegExp(currentClassName, 'ig');
230+
const reg = new RegExp(currentClassName, 'g');
230231
elem.className = elem.className.replace(reg, '');
231-
elem.className += (' ' + this.props.animatingClassName[0]);
232232
});
233233
}
234234

@@ -238,17 +238,17 @@ class QueueAnim extends React.Component {
238238
}
239239
elements.forEach((elem) => {
240240
const currentClassName = this.props.animatingClassName[0];
241-
const reg = new RegExp(currentClassName, 'ig');
241+
const reg = new RegExp(currentClassName, 'g');
242242
elem.className = elem.className.replace(reg, '').trim();
243243
});
244244
}
245245

246246
leaveBegin(elements) {
247247
elements.forEach((elem) => {
248+
elem.className += (' ' + this.props.animatingClassName[1]);
248249
const currentClassName = this.props.animatingClassName[0];
249-
const reg = new RegExp(currentClassName, 'ig');
250+
const reg = new RegExp(currentClassName, 'g');
250251
elem.className = elem.className.replace(reg, '');
251-
elem.className += (' ' + this.props.animatingClassName[1]);
252252
});
253253
}
254254

@@ -272,7 +272,7 @@ class QueueAnim extends React.Component {
272272
}
273273
elements.forEach((elem) => {
274274
const currentClassName = this.props.animatingClassName[1];
275-
const reg = new RegExp(currentClassName, 'ig');
275+
const reg = new RegExp(currentClassName, 'g');
276276
elem.className = elem.className.replace(reg, '').trim();
277277
});
278278
}

0 commit comments

Comments
 (0)