Skip to content

Commit d296268

Browse files
committed
fixed regex used in the “DummyPlaceholder”
1 parent bb0ae16 commit d296268

File tree

1 file changed

+2
-2
lines changed
  • packages/components/tests/dummy/app/components/dummy-placeholder

1 file changed

+2
-2
lines changed

packages/components/tests/dummy/app/components/dummy-placeholder/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default class DummyPlaceholderIndexComponent extends Component {
1111
get width() {
1212
let { width = '100%' } = this.args;
1313

14-
if (typeof width === 'string' && width.match(/[\d]+/)) {
14+
if (typeof width === 'string' && width.match(/^[\d]+$/)) {
1515
width = `${parseInt(width, 10)}px`;
1616
}
1717

@@ -28,7 +28,7 @@ export default class DummyPlaceholderIndexComponent extends Component {
2828
get height() {
2929
let { height = '100%' } = this.args;
3030

31-
if (typeof height === 'string' && height.match(/[\d]+/)) {
31+
if (typeof height === 'string' && height.match(/^[\d]+$/)) {
3232
height = `${parseInt(height, 10)}px`;
3333
}
3434

0 commit comments

Comments
 (0)