diff --git a/lib/node-gd.js b/lib/node-gd.js index 9b82b5b..ea29dd2 100644 --- a/lib/node-gd.js +++ b/lib/node-gd.js @@ -85,9 +85,11 @@ formats.forEach(format => { return; } - Object.defineProperty(bindings.Image.prototype, `save${format}`, { - value: saveFormatFn(format) - }); + if (!bindings.Image.prototype[`save${format}`]) { + Object.defineProperty(bindings.Image.prototype, `save${format}`, { + value: saveFormatFn(format) + }); + } }); /**