diff --git a/packages/convert-svg-core/src/API.js b/packages/convert-svg-core/src/API.js index a570384..d9172ea 100644 --- a/packages/convert-svg-core/src/API.js +++ b/packages/convert-svg-core/src/API.js @@ -41,6 +41,11 @@ class API { */ constructor(provider) { this[_provider] = provider; + + // Workaround for #22 by ensuring all public methods are bound to this instance + this.convert = this.convert.bind(this); + this.convertFile = this.convertFile.bind(this); + this.createConverter = this.createConverter.bind(this); } /**