We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6a7215 commit 293a3f5Copy full SHA for 293a3f5
lib/api.js
@@ -165,7 +165,7 @@ export const synchronizeZeroTrustLists = async (items) => {
165
// Are there any more appends remaining?
166
if (toAdd.length) {
167
// We'll need to create new list(s)
168
- const nextListNumber = Math.max(...cgpsLists.map(list => parseInt(list.name.replace('CGPS List - Chunk ', ''))).filter(x => Number.isInteger(x))) + 1;
+ const nextListNumber = Math.max(0, ...cgpsLists.map(list => parseInt(list.name.replace('CGPS List - Chunk ', ''))).filter(x => Number.isInteger(x))) + 1;
169
await createZeroTrustListsOneByOne(toAdd, nextListNumber);
170
}
171
};
0 commit comments