diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-07-21 16:02:53 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-07-21 16:02:53 -0400 |
commit | 12dd45618c0dc595b8e6663bf8d3635dd7161306 (patch) | |
tree | f5687bd05c3e015a0d73d6e1cbac8f590b4fe117 /src/client/documents/Documents.ts | |
parent | b4b817585995b4ce504564cb0601f34ed86fc4db (diff) |
fixed compile warnings
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 657ba521b..e2569ec70 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -550,7 +550,9 @@ export namespace Docs { const dataDoc = MakeDataDelegate(proto, protoProps, data, fieldKey); const viewDoc = Doc.MakeDelegate(dataDoc, delegId); - // so that the list of annotations is already initialised, prevents issues in addonly + // so that the list of annotations is already initialised, prevents issues in addonly. + // without this, if a doc has no annotations but the user has AddOnly privileges, they won't be able to add an annotation because they would have needed to create the field's list which they don't have permissions to do. + dataDoc[fieldKey + "-annotations"] = new List<Doc>(); proto.links = ComputedField.MakeFunction("links(self)"); |