From bdeb59b47556af6b7c49f157551eccd123104cb8 Mon Sep 17 00:00:00 2001 From: McKenzie Bourn <107959606+kenziebourn@users.noreply.github.com> Date: Thu, 26 Dec 2024 02:51:09 -0800 Subject: [PATCH] Fix #1068: Do not try to import empty array of values on database (#1070) --- js/import-export.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/import-export.js b/js/import-export.js index 0dc462e69..6f3d608e7 100644 --- a/js/import-export.js +++ b/js/import-export.js @@ -84,7 +84,7 @@ function validEntry(entry) let validatedTime = true; if (entry.type === 'flexible') { - hasExpectedProperties = entry.hasOwnProperty('values') && Array.isArray(entry.values); + hasExpectedProperties = entry.hasOwnProperty('values') && Array.isArray(entry.values) && entry.values.length > 0; if (hasExpectedProperties) { for (const value of entry.values)