Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
fix(ActionInsertLink): Don't throw an error when closing file picker …
…dialog

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed May 6, 2025
commit c7b1bc82928472286bbe918ba81ad245634f3d57
2 changes: 1 addition & 1 deletion src/components/Menu/ActionInsertLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@
.build()

filePicker.pick()
.then((files) => {

Check warning on line 152 in src/components/Menu/ActionInsertLink.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Menu/ActionInsertLink.vue#L152

Added line #L152 was not covered by tests
const client = OC.Files.getClient()
client.getFileInfo(files[0]).then((_status, fileInfo) => {

Check warning on line 154 in src/components/Menu/ActionInsertLink.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Menu/ActionInsertLink.vue#L154

Added line #L154 was not covered by tests
const url = new URL(generateUrl(`/f/${fileInfo.id}`), window.origin)
this.setLink(url.href, fileInfo.name)
this.startPath = fileInfo.path + (fileInfo.type === 'dir' ? `/${fileInfo.name}/` : '')
Expand All @@ -160,7 +160,7 @@
})
.catch(() => {
// do not close menu but keep focus
this.$refs.buttonFile.$el.focus()
this.$refs.buttonFile?.$el.focus()

Check warning on line 163 in src/components/Menu/ActionInsertLink.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Menu/ActionInsertLink.vue#L163

Added line #L163 was not covered by tests
})
},

Expand Down
Loading