diff options
| author | yipstanley <stanley_yip@brown.edu> | 2019-07-13 17:42:26 -0400 |
|---|---|---|
| committer | yipstanley <stanley_yip@brown.edu> | 2019-07-13 17:42:26 -0400 |
| commit | 4390106eb59a90283395ae5a18a0451e43166889 (patch) | |
| tree | 722275400fa781ad8ada4fbcd7aef1d22954abd1 /src/client/views/Main.tsx | |
| parent | 3c6c4e6da942ef4c1e7faebdc165eb4fcaa7bee4 (diff) | |
oops duplicates
Diffstat (limited to 'src/client/views/Main.tsx')
| -rw-r--r-- | src/client/views/Main.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index 971658473..589542806 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -16,13 +16,14 @@ let swapDocs = async () => { if (links && links.length) { let data = await DocListCastAsync(Docs.Prototypes.MainLinkDocument().allLinks); if (data) { - data.push(...links); + data.push(...links.filter(i => data!.indexOf(i) === -1)); + Docs.Prototypes.MainLinkDocument().allLinks = new List<Doc>(data.filter((i, idx) => data!.indexOf(i) === idx)); } else { Docs.Prototypes.MainLinkDocument().allLinks = new List<Doc>(links); } } - CurrentUserUtils.UserDocument.LinkManagerDoc = undefined; + CurrentUserUtils.UserDocument.linkManagerDoc = undefined; } } |
