Skip to content

Commit

Permalink
Merge pull request #8048 from Fonger/fix/version-error-memory-leak
Browse files Browse the repository at this point in the history
fix(model): delete versionError after saving to prevent memory leak
  • Loading branch information
vkarpov15 committed Aug 6, 2019
2 parents 612c4f9 + 1dc4715 commit 419cfef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/model.js
Expand Up @@ -467,6 +467,7 @@ Model.prototype.save = function(options, fn) {
this.$__save(options, error => {
this.$__.saving = undefined;
delete this.$__.saveOptions;
delete this.$__.versionError;

if (error) {
this.$__handleReject(error);
Expand Down

0 comments on commit 419cfef

Please sign in to comment.