actually fixed it this time

This commit is contained in:
Ell 2023-11-22 22:33:38 +01:00
parent e8d484828e
commit 89045614ac

View file

@ -50,7 +50,7 @@ async function upload() {
});
if (response.status != 404) {
let data = JSON.parse(xml.toJson(response.data));
let dirs = data["d:multistatus"]["d:response"]?.slice(1) || [];
let dirs = data["d:multistatus"]["d:response"]?.slice?.(1) || [];
// sort directories by last modified
dirs.sort((a, b) => new Date(a["d:propstat"]["d:prop"]["d:getlastmodified"]) - new Date(b["d:propstat"]["d:prop"]["d:getlastmodified"]));
while (dirs.length >= parseInt(retentionAmount)) {