diff --git a/CHANGELOG.md b/CHANGELOG.md index ba0c76fc07e..41dd5a469b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [5.4.2] + +- fix() Use correct Path context when creating the svg for the path [`#10276`](https://github.com/fabricjs/fabric.js/pull/10276) + ## [5.4.1] - fix() Fix the svg export of text with path [`#10268`](https://github.com/fabricjs/fabric.js/pull/10268) diff --git a/src/mixins/itext.svg_export.js b/src/mixins/itext.svg_export.js index 562a4f89e09..e3ef5ce105a 100644 --- a/src/mixins/itext.svg_export.js +++ b/src/mixins/itext.svg_export.js @@ -26,13 +26,15 @@ */ toSVG: function(reviver) { var textSvg = this._createBaseSVGMarkup( - this._toSVG(), - { reviver: reviver, noStyle: true, withShadow: true } - ); - if (this.path) { + this._toSVG(), + { reviver: reviver, noStyle: true, withShadow: true } + ), + path = this.path; + + if (path) { return ( textSvg + - this._createBaseSVGMarkup(this.path._toSVG(), { + path._createBaseSVGMarkup(path._toSVG(), { reviver: reviver, withShadow: true, })