aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-04-05 09:56:48 -0400
committerbob <bcz@cs.brown.edu>2019-04-05 09:56:48 -0400
commit25d56d2f490ca6c8ea685b832332605a7fc6042a (patch)
tree2b363309a347e8dea50f712ac4569d2d4e9fe531 /src/client/views/collections
parent39ab550efc4eedeb7a9295a68c0d23e54ad086f2 (diff)
fixed exception w/ brushing. added undo for dragging items into workspace.
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
index eb20b3100..35fa6f99f 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
@@ -36,7 +36,7 @@ export class CollectionFreeFormLinksView extends React.Component<CollectionViewP
let dstTarg = (protoDest ? protoDest : dstDoc);
let srcTarg = (protoSrc ? protoSrc : srcDoc);
let findBrush = (field: ListField<Document>) => field.Data.findIndex(brush => {
- let bdocs = brush.GetList(KeyStore.BrushingDocs, [] as Document[]);
+ let bdocs = brush ? brush.GetList(KeyStore.BrushingDocs, [] as Document[]) : [];
return (bdocs.length == 0 || (bdocs[0] == dstTarg && bdocs[1] == srcTarg) || (bdocs[0] == srcTarg && bdocs[1] == dstTarg))
});
let brushAction = (field: ListField<Document>) => {