Merge pull request #2166 from cryptpad/fix-5xx-deleteLastCP-call

Do not delete last checkpoint on 5xx error
This commit is contained in:
yflory 2026-01-29 16:25:00 +01:00 committed by GitHub
commit fb772bc2e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -734,7 +734,7 @@ define([
if (window.sendCredentials) { xhr.withCredentials = true; }
xhr.responseType = 'arraybuffer';
xhr.onload = function () {
if (/^4/.test('' + this.status)) {
if (/^[45]/.test('' + this.status)) {
reject(this.status);
return void console.error('XHR error', this.status);
}