We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb0ae16 commit d296268Copy full SHA for d296268
packages/components/tests/dummy/app/components/dummy-placeholder/index.js
@@ -11,7 +11,7 @@ export default class DummyPlaceholderIndexComponent extends Component {
11
get width() {
12
let { width = '100%' } = this.args;
13
14
- if (typeof width === 'string' && width.match(/[\d]+/)) {
+ if (typeof width === 'string' && width.match(/^[\d]+$/)) {
15
width = `${parseInt(width, 10)}px`;
16
}
17
@@ -28,7 +28,7 @@ export default class DummyPlaceholderIndexComponent extends Component {
28
get height() {
29
let { height = '100%' } = this.args;
30
31
- if (typeof height === 'string' && height.match(/[\d]+/)) {
+ if (typeof height === 'string' && height.match(/^[\d]+$/)) {
32
height = `${parseInt(height, 10)}px`;
33
34
0 commit comments