aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2020-05-09 15:25:17 +1000
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2020-05-09 15:25:17 +1000
commit094fe85c6676fa26a8a033aaca89c06ed3e2962f (patch)
treeee2e49cb16c0f78b8fb04e2e7b7446901fc4cbb4
parente541557d0a7ca53b0ad2fa343ee91203d1811248 (diff)
downloadsvg.js-094fe85c6676fa26a8a033aaca89c06ed3e2962f.tar.gz
svg.js-094fe85c6676fa26a8a033aaca89c06ed3e2962f.zip
make targets for textPath work when no href is set
-rw-r--r--spec/spec/modules/core/circled.js2
-rw-r--r--src/elements/TextPath.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec/modules/core/circled.js b/spec/spec/modules/core/circled.js
index ae01f0c..a6324d8 100644
--- a/spec/spec/modules/core/circled.js
+++ b/spec/spec/modules/core/circled.js
@@ -8,7 +8,7 @@ describe('circled.js', () => {
let element
beforeEach(() => {
- element = new Ellipse().move(50, 50)
+ element = new Ellipse().size(50, 50)
})
describe('rx()', () => {
diff --git a/src/elements/TextPath.js b/src/elements/TextPath.js
index 9ed4a71..edac399 100644
--- a/src/elements/TextPath.js
+++ b/src/elements/TextPath.js
@@ -93,7 +93,7 @@ registerMethods({
targets () {
return baseFind('svg textPath').filter((node) => {
- return node.attr('href').includes(this.id())
+ return (node.attr('href') || '').includes(this.id())
})
// Does not work in IE11. Use when IE support is dropped