From 7d9e295b759ccd1ca77e286651c3da71284631e3 Mon Sep 17 00:00:00 2001 From: Frankie Date: Fri, 21 Oct 2016 16:39:14 -0700 Subject: Change regex in isHex function --- ui/app/util.js | 5 +---- 1 file changed, 1 insertion(+), 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]+$/)) } -- cgit v1.2.3