aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-05 18:52:46 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-05 18:53:00 -1000
commita06789afcc5b53c34d19d2d9d35c3b91c705d91c (patch)
tree79064778bd2a5acf482d4bb3885f71fc8635beeb /lib
parent49d72723ed74ac04099a46e2aae2ef68432ba210 (diff)
downloadpatchfoo-a06789afcc5b53c34d19d2d9d35c3b91c705d91c.tar.gz
patchfoo-a06789afcc5b53c34d19d2d9d35c3b91c705d91c.zip
check ref is string
Diffstat (limited to 'lib')
-rw-r--r--lib/util.js1
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)
}