aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/util.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/ui/app/util.js b/ui/app/util.js
index 72b3af465..7a56bf6a0 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -212,8 +212,5 @@ function readableDate (ms) {
}
function isHex (str) {
- if (str.startsWith('0x')) {
- return !str.substring(2).match(/([g-zG-Z]|\W)/)
- }
- return !str.match(/([g-zG-Z]|\W)/)
+ return Boolean(str.match(/^(0x)?[0-9a-fA-F]+$/))
}