File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
ui/components/app/modals/customize-nonce Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ const CustomizeNonce = ({
27
27
updateCustomNonce,
28
28
getNextNonce,
29
29
} ) => {
30
- const [ customNonce , setCustomNonce ] = useState ( '' ) ;
30
+ const defaultNonce =
31
+ customNonceValue || ( typeof nextNonce === 'number' && nextNonce . toString ( ) ) ;
32
+ const [ customNonce , setCustomNonce ] = useState ( defaultNonce ) ;
31
33
const t = useI18nContext ( ) ;
32
34
33
35
return (
@@ -107,10 +109,7 @@ const CustomizeNonce = ({
107
109
type = "number"
108
110
data-testid = "custom-nonce-input"
109
111
min = "0"
110
- placeholder = {
111
- customNonceValue ||
112
- ( typeof nextNonce === 'number' && nextNonce . toString ( ) )
113
- }
112
+ placeholder = { defaultNonce }
114
113
onChange = { ( e ) => {
115
114
setCustomNonce ( e . target . value ) ;
116
115
} }
You can’t perform that action at this time.
0 commit comments