Merge pull request #28845 from overleaf/td-async-await-doc-updater-client
Convert DocUpdateClient in document-updater acceptance tests to async/await GitOrigin-RevId: 8f2352119f8f1175c2703ed90dbbc483ed039e86
This commit is contained in:
@@ -226,7 +226,11 @@ async function setDoc(req, res) {
|
||||
)
|
||||
timer.done()
|
||||
logger.debug({ projectId, docId }, 'set doc via http')
|
||||
res.json(result)
|
||||
|
||||
// If the document is unchanged and hasn't been updated, `result` will be
|
||||
// undefined, which leads to an invalid JSON response, so we send an empty
|
||||
// object instead.
|
||||
res.json(result || {})
|
||||
}
|
||||
|
||||
async function appendToDoc(req, res) {
|
||||
|
||||
Reference in New Issue
Block a user