1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

All: Fixes #2485: Better handling of rare error in WebDAV server

This commit is contained in:
Laurent Cozic 2020-02-14 00:53:51 +00:00
parent 675ef8aefd
commit 79f5bcd2fc

View File

@ -433,7 +433,7 @@ class WebDavApi {
if (['MKCOL', 'DELETE', 'PUT', 'MOVE'].indexOf(method) >= 0) return null;
const output = await loadResponseJson();
this.handleNginxHack_(output, newError);
if (output) this.handleNginxHack_(output, newError);
// Check that we didn't get for example an HTML page (as an error) instead of the JSON response
// null responses are possible, for example for DELETE calls