From 094fe85c6676fa26a8a033aaca89c06ed3e2962f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Sat, 9 May 2020 15:25:17 +1000 Subject: [PATCH] make targets for textPath work when no href is set --- spec/spec/modules/core/circled.js | 2 +- src/elements/TextPath.js | 2 +- 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 -- 2.39.5