Browse Source

Fix a regular expression

Pipe (|) is not supposed to be used as a delimiter in character classes, though
it seems like that's what someone's trying to do here, given it's trying to
extract numbers from a css transform property.
pull/13744/head
Sam Lanning 6 years ago
committed by 偏右
parent
commit
97ee28ee7a
  1. 2
      site/theme/template/Home/Page1.jsx

2
site/theme/template/Home/Page1.jsx

@ -220,7 +220,7 @@ const page1Data = [
];
const getTransformXY = t => {
const s = t.replace(/[a-z|(|)]/g, '').split(',');
const s = t.replace(/[a-z()]/g, '').split(',');
return {
x: s[0],
y: s[1],

Loading…
Cancel
Save