From 668d62fa3f9273561d25ff924c9ef5c4f3755698 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Fri, 29 Oct 2021 00:23:19 +0200 Subject: [PATCH] importHtml: avoid race when applying empty document and the import changeset at the same time --- src/node/utils/ImportHtml.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node/utils/ImportHtml.js b/src/node/utils/ImportHtml.js index 13fb7479..13befe72 100644 --- a/src/node/utils/ImportHtml.js +++ b/src/node/utils/ImportHtml.js @@ -94,8 +94,6 @@ exports.setPadHTML = async (pad, html) => { const theChangeset = builder.toString(); apiLogger.debug(`The changeset: ${theChangeset}`); - await Promise.all([ - pad.setText('\n'), - pad.appendRevision(theChangeset), - ]); + await pad.setText('\n'); + await pad.appendRevision(theChangeset); };