aboutsummaryrefslogtreecommitdiff
path: root/src/fields/List.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/fields/List.ts')
-rw-r--r--src/fields/List.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fields/List.ts b/src/fields/List.ts
index eb735dec2..325b36597 100644
--- a/src/fields/List.ts
+++ b/src/fields/List.ts
@@ -82,11 +82,11 @@ const listHandlers: any = {
hintArray.push({val : list.__fields[i], index : i});
}
const res = list.__fields.splice(start, deleteCount, ...items);
- // console.log(hintArray);
- // console.log(list.__fields);
+ // the hint object sends the starting index of the slice and the number
+ // of elements to delete.
this[Update](
items.length === 0 && deleteCount
- ? { op: '$remFromSet', items: removed, hint : { start : start, deleteCount : deleteCount, hintArray : hintArray}, length: list.__fields.length }
+ ? { op: '$remFromSet', items: removed, hint : { start : start, deleteCount : deleteCount }, length: list.__fields.length }
: items.length && !deleteCount && start === list.__fields.length
? { op: '$addToSet', items, length: list.__fields.length }
: undefined