aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-03-28 12:59:35 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-03-28 12:59:35 -0400
commitfddd13da196a26affe61b30d93a3fe1b24f391a6 (patch)
treea28175619afaf14b83c98fc6282419f1d1a2c82d /src/client/views/collections/CollectionView.tsx
parentcbf88ae3466e17fef57c7d63cc72ee42b75ccce6 (diff)
works better with prototypes and links
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
-rw-r--r--src/client/views/collections/CollectionView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 2fa2c9086..789f07e8c 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -69,9 +69,9 @@ export class CollectionView extends React.Component<CollectionViewProps> {
@action
public static AddDocument(props: CollectionViewProps, doc: Document, allowDuplicates: boolean): boolean {
var curPage = props.Document.GetNumber(KeyStore.CurPage, -1);
- doc.SetNumber(KeyStore.Page, curPage);
+ doc.SetOnPrototype(KeyStore.Page, new NumberField(curPage));
if (curPage > 0) {
- doc.Set(KeyStore.AnnotationOn, props.Document);
+ doc.SetOnPrototype(KeyStore.AnnotationOn, props.Document);
}
if (props.Document.Get(props.fieldKey) instanceof Field) {
//TODO This won't create the field if it doesn't already exist