importHtml: avoid race when applying empty document and the import changeset at the same time

This commit is contained in:
webzwo0i 2021-10-29 00:23:19 +02:00 committed by Richard Hansen
parent 8eb5640cb7
commit 668d62fa3f

View file

@ -94,8 +94,6 @@ exports.setPadHTML = async (pad, html) => {
const theChangeset = builder.toString(); const theChangeset = builder.toString();
apiLogger.debug(`The changeset: ${theChangeset}`); apiLogger.debug(`The changeset: ${theChangeset}`);
await Promise.all([ await pad.setText('\n');
pad.setText('\n'), await pad.appendRevision(theChangeset);
pad.appendRevision(theChangeset),
]);
}; };