diff options
Diffstat (limited to 'lib/util.js')
-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) } |