pi-ui-extend 0.1.69 → 0.1.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -266,6 +266,12 @@ export function applyTaskMutation(state: TaskState, action: TaskAction, params:
|
|
|
266
266
|
|
|
267
267
|
case "batch_update": {
|
|
268
268
|
if (!params.items?.length) return errorResult(state, "items required for batch_update");
|
|
269
|
+
const seenIds = new Set<number>();
|
|
270
|
+
for (const item of params.items) {
|
|
271
|
+
if (item.id === undefined) continue;
|
|
272
|
+
if (seenIds.has(item.id)) return errorResult(state, `duplicate id in batch_update: #${item.id}`);
|
|
273
|
+
seenIds.add(item.id);
|
|
274
|
+
}
|
|
269
275
|
let working = state;
|
|
270
276
|
const ids: number[] = [];
|
|
271
277
|
for (let i = 0; i < params.items.length; i++) {
|
package/package.json
CHANGED