Check for toHuman before using (#2571)
This commit is contained in:
parent
a38a456d34
commit
db121c1c37
@ -23,7 +23,9 @@ function StaticParam ({ asHex, children, className, defaultValue, label, style }
|
||||
const value = defaultValue && defaultValue.value && (
|
||||
asHex
|
||||
? defaultValue.value.toHex()
|
||||
: JSON.stringify(defaultValue.value.toHuman(), null, 2).replace(/"/g, '')
|
||||
: JSON.stringify(
|
||||
defaultValue.value.toHuman ? defaultValue.value.toHuman() : defaultValue.value, null, 2
|
||||
).replace(/"/g, '')
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user