Skip to content

Commit

Permalink
add null fallback to share attributes
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
  • Loading branch information
andrey18106 committed Dec 4, 2023
1 parent 16313b1 commit acee134
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/filesplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ if (OCA.Files && OCA.Files.fileActions) {
fileType: file.dataset.type,
size: Number(file.dataset.size),
mtime: Number(file.dataset.mtime) / 1000, // convert ms to s
shareTypes: file.dataset?.shareTypes,
shareAttributes: file.dataset?.shareAttributes,
sharePermissions: file.dataset?.sharePermissions,
shareOwner: file.dataset?.shareOwner,
shareOwnerId: file.dataset?.shareOwnerId,
shareTypes: file.dataset?.shareTypes || null,
shareAttributes: file.dataset?.shareAttributes || null,
sharePermissions: file.dataset?.sharePermissions || null,
shareOwner: file.dataset?.shareOwner || null,
shareOwnerId: file.dataset?.shareOwnerId || null,
userId: getCurrentUser().uid,
instanceId: state.instanceId,
}).then((response) => {
Expand Down Expand Up @@ -102,11 +102,11 @@ if (OCA.Files && OCA.Files.fileActions) {
fileType: node.type,
size: Number(node.size),
mtime: new Date(node.mtime).getTime() / 1000, // convert ms to s
shareTypes: node.attributes.shareTypes,
shareAttributes: node.attributes.shareAttributes,
sharePermissions: node.attributes.sharePermissions,
shareOwner: node.attributes.ownerDisplayName,
shareOwnerId: node.attributes.ownerId,
shareTypes: node.attributes.shareTypes || null,
shareAttributes: node.attributes.shareAttributes || null,
sharePermissions: node.attributes.sharePermissions || null,
shareOwner: node.attributes.ownerDisplayName || null,
shareOwnerId: node.attributes.ownerId || null,
userId: getCurrentUser().uid,
instanceId: state.instanceId,
}).then((response) => {
Expand Down

0 comments on commit acee134

Please sign in to comment.