Skip to content

Commit 3bae273

Browse files
committed
Fix WordPress.com hosting discount calculation
1 parent 9512f79 commit 3bae273

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: .eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ module.exports = {
501501
'__experimentalNavigatorProvider',
502502
'__experimentalNavigatorScreen',
503503
'__experimentalUseNavigator',
504+
'__experimentalNumberControl',
504505
'__unstableComposite',
505506
'__unstableCompositeItem',
506507
'__unstableUseCompositeState',

Diff for: client/a8c-for-agencies/components/a4a-number-input-v2/index.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line wpcalypso/no-unsafe-wp-apis
21
import { __experimentalNumberControl as NumberControl } from '@wordpress/components';
32

43
import './style.scss';
@@ -19,7 +18,9 @@ export default function A4ANumberInputV2( {
1918
increment = 1,
2019
}: Props ) {
2120
const handleOnChange = ( newValue: unknown ) => {
22-
onChange( newValue as number );
21+
// Force convert to number, if NaN use minimum
22+
const numberValue = Number( newValue ) || minimum;
23+
onChange( numberValue );
2324
};
2425

2526
return (

0 commit comments

Comments
 (0)