diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 9a0d1ee71..0172400b3 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -773,8 +773,9 @@ function handleUserChanges(data, cb) } // Make sure the pad always ends with an empty line. - if (pad.text().lastIndexOf("\n\n") != pad.text().length-2) { - var nlChangeset = Changeset.makeSplice(pad.text(), pad.text().length-1, 0, "\n"); + if (pad.text().lastIndexOf("\n") != pad.text().length-1) { + var nlChangeset = Changeset.makeSplice(pad.text(), pad.text().length-1, + 0, "\n"); pad.appendRevision(nlChangeset); }