diff options
author | andrewdkim <adkim414@gmail.com> | 2019-09-29 14:18:45 -0400 |
---|---|---|
committer | andrewdkim <adkim414@gmail.com> | 2019-09-29 14:18:45 -0400 |
commit | 97f8d0fc8c0ccf79c2b858a2181e201960d01d8b (patch) | |
tree | 16853d246ade3925bc6b424f3b83dd3534fa1e9a /src/new_fields/Doc.ts | |
parent | 8c018a7a686a752ef1b86b852ec2d298792aa354 (diff) | |
parent | c40480ec1a2da84b4223b0605bea2fe19df1104c (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into animationtimeline_two
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index f95df0ccb..605877efa 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -344,7 +344,7 @@ export namespace Doc { let list = Cast(target[key], listSpec(Doc)); if (list) { if (allowDuplicates !== true) { - let pind = list.reduce((l, d, i) => d instanceof Doc && Doc.AreProtosEqual(d, doc) ? i : l, -1); + let pind = list.reduce((l, d, i) => d instanceof Doc && d[Id] === doc[Id] ? i : l, -1); if (pind !== -1) { list.splice(pind, 1); } |