aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-26 11:47:16 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-26 11:47:16 +0200
commit5520d76e4332c1a782899679ffa8cca2285a70ce (patch)
tree4d7068ce2f4c8f17ad0a8bcc9f996d20e4b99c2b /src
parent83af17a691d6f60d9ba75290cb1c087dbf8e5db1 (diff)
downloadsvg.js-5520d76e4332c1a782899679ffa8cca2285a70ce.tar.gz
svg.js-5520d76e4332c1a782899679ffa8cca2285a70ce.zip
fixed `reference()` which failed when trying to use a reference which does not exist in the attribuets (#840)
Diffstat (limited to 'src')
-rw-r--r--src/helpers.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers.js b/src/helpers.js
index 5e6df04..d87ea9a 100644
--- a/src/helpers.js
+++ b/src/helpers.js
@@ -163,7 +163,7 @@ function fullBox(b) {
// Get id from reference string
function idFromReference(url) {
- var m = url.toString().match(SVG.regex.reference)
+ var m = (url || '').toString().match(SVG.regex.reference)
if (m) return m[1]
}