Skip to content

Commit

Permalink
fix of import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
maximshe committed Dec 20, 2021
1 parent a55d0d5 commit df75957
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/node-gd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});
}
});

/**
Expand Down

0 comments on commit df75957

Please sign in to comment.