Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix js search in undefined ocs response
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
  • Loading branch information
skjnldsv committed Nov 9, 2020
commit 53e56b4d569d42422f16f07801124906effbd34d
2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions apps/files_sharing/src/mixins/ShareRequests.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default {
async createShare({ path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label }) {
try {
const request = await axios.post(shareUrl, { path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label })
if (!('ocs' in request.data)) {
if (!request?.data?.ocs) {
throw request
}
return new Share(request.data.ocs.data)
Expand All @@ -73,7 +73,7 @@ export default {
async deleteShare(id) {
try {
const request = await axios.delete(shareUrl + `/${id}`)
if (!('ocs' in request.data)) {
if (!request?.data?.ocs) {
throw request
}
return true
Expand All @@ -93,7 +93,7 @@ export default {
async updateShare(id, properties) {
try {
const request = await axios.put(shareUrl + `/${id}`, properties, headers)
if (!('ocs' in request.data)) {
if (!request?.data?.ocs) {
throw request
}
return true
Expand Down