Skip to content

Commit

Permalink
fix(model): delete versionError after saving to prevent memory leak
Browse files Browse the repository at this point in the history
Fix Automattic#8040 introduced in ae82062
  • Loading branch information
Fonger committed Aug 4, 2019
1 parent dc2e87c commit 1dc4715
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 1dc4715

Please sign in to comment.