From f7f5e3dad85c606e9b5a880a598a5ea9acdc3675 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Fri, 29 Oct 2021 00:54:18 +0200 Subject: [PATCH] setText: prevent adding useless revision in case the pad text did not change --- src/node/db/Pad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js index db35daf19..fe4ea78d0 100644 --- a/src/node/db/Pad.js +++ b/src/node/db/Pad.js @@ -258,7 +258,7 @@ Pad.prototype.setText = async function (newText) { } // append the changeset - await this.appendRevision(changeset); + if (newText !== oldText) await this.appendRevision(changeset); }; Pad.prototype.appendText = async function (newText) {