Skip to content

Commit 9340b4d

Browse files
committed
fix match is not a function, lock ant-design/ant-design-landing#6
1 parent c8e8af8 commit 9340b4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-tween-one",
3-
"version": "2.2.14",
3+
"version": "2.2.15",
44
"description": "tween-one anim component for react",
55
"keywords": [
66
"react",

src/plugin/StylePlugin.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ p.getAnimStart = function (computedStyle, tween, isSvg) {
131131
style.transform || getTransform(startData));
132132
const unitReg = /%|vw|vh|em|rem/i;
133133
if (endUnit && endUnit.match(unitReg)) {
134-
transform[key] = transform[key] && transform[key].match(unitReg) ?
134+
transform[key] = transform[key] && transform[key].toString().match(unitReg) ?
135135
parseFloat(transform[key])
136136
: startConvertToEndUnit(this.target, computedStyle,
137137
key, transform[key], null, endUnit);

0 commit comments

Comments
 (0)