diff options
Diffstat (limited to 'ui/app/util.js')
-rw-r--r-- | ui/app/util.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index a519ab5b4..72b3af465 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -212,7 +212,8 @@ function readableDate (ms) { } function isHex (str) { - if (str.startsWith('0x')) str = str.replace('0x', '') - if (str.match(/[g-zG-Z]/) || str.match(/\W/)) return false - return true + if (str.startsWith('0x')) { + return !str.substring(2).match(/([g-zG-Z]|\W)/) + } + return !str.match(/([g-zG-Z]|\W)/) } |