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
The original fix in PR Automattic#8048 has a typo. This really fix the issue.
  • Loading branch information
Fonger committed Nov 12, 2019
1 parent 95b25ce commit de583bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model.js
Expand Up @@ -465,7 +465,7 @@ Model.prototype.save = function(options, fn) {
this.$__save(options, error => {
this.$__.saving = undefined;
delete this.$__.saveOptions;
delete this.$__.versionError;
delete this.$__.$versionError;

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

0 comments on commit de583bb

Please sign in to comment.