Skip to content

Commit f7f5e3d

Browse files
webzwo0irhansen
authored andcommitted
setText: prevent adding useless revision in case the pad text did not
change
1 parent 63de249 commit f7f5e3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/db/Pad.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Pad.prototype.setText = async function (newText) {
258258
}
259259

260260
// append the changeset
261-
await this.appendRevision(changeset);
261+
if (newText !== oldText) await this.appendRevision(changeset);
262262
};
263263

264264
Pad.prototype.appendText = async function (newText) {

0 commit comments

Comments
 (0)