Skip to content

Commit 143aa2a

Browse files
committed
Support empty lists
1 parent 293a3f5 commit 143aa2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const synchronizeZeroTrustLists = async (items) => {
8585
if (result_info.total_count > LIST_ITEM_SIZE) {
8686
console.log(`List ${list.name} contains more entries that LIST_ITEM_SIZE. Checking only the first ${LIST_ITEM_SIZE} entires. You may want to delete this list and recreate using the same size limit.`);
8787
}
88-
domainsByList[list.id] = listItems.map(item => item.value);
88+
domainsByList[list.id] = listItems?.map(item => item.value) || [];
8989
}
9090

9191
// Extract all the list entries into a map, keyed by domain, pointing to the list.

0 commit comments

Comments
 (0)