Skip to content

Commit

Permalink
Fix #1068: Do not try to import empty array of values on database (#1070
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kenziebourn authored Dec 26, 2024
1 parent 9a16706 commit bdeb59b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/import-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bdeb59b

Please sign in to comment.