diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-05 18:52:46 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-05 18:53:00 -1000 |
commit | a06789afcc5b53c34d19d2d9d35c3b91c705d91c (patch) | |
tree | 79064778bd2a5acf482d4bb3885f71fc8635beeb | |
parent | 49d72723ed74ac04099a46e2aae2ef68432ba210 (diff) | |
download | patchfoo-a06789afcc5b53c34d19d2d9d35c3b91c705d91c.tar.gz patchfoo-a06789afcc5b53c34d19d2d9d35c3b91c705d91c.zip |
check ref is string
-rw-r--r-- | lib/util.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/util.js b/lib/util.js index 0a6356c..90fc55a 100644 --- a/lib/util.js +++ b/lib/util.js @@ -6,6 +6,7 @@ var u = exports u.ssbRefRegex = /((?:@|%|&|ssb:\/\/%)[A-Za-z0-9\/+]{43}=\.[\w\d]+)/g u.isRef = function (str) { + if (!str) return false u.ssbRefRegex.lastIndex = 0 return u.ssbRefRegex.test(str) } |