From 89045614acf2acd775188cb28d7b810c57eca51f Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 22 Nov 2023 22:33:38 +0100 Subject: [PATCH] actually fixed it this time --- nextcloud-upload/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud-upload/run.js b/nextcloud-upload/run.js index bbc39d4..b7730b0 100644 --- a/nextcloud-upload/run.js +++ b/nextcloud-upload/run.js @@ -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)) {