From 1dc4715f685b65086fcef86e162f2fe51e8b6814 Mon Sep 17 00:00:00 2001 From: Fonger <5862369+Fonger@users.noreply.github.com> Date: Sun, 4 Aug 2019 10:03:11 +0800 Subject: [PATCH] fix(model): delete versionError after saving to prevent memory leak Fix #8040 introduced in ae8206280fa9861495b6bcf62a8fc7b5d6ca60bf --- lib/model.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/model.js b/lib/model.js index 1dd87fbd89d..9c21469aca8 100644 --- a/lib/model.js +++ b/lib/model.js @@ -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);