aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/OC/dialogs.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/OC/dialogs.js')
-rw-r--r--core/src/OC/dialogs.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js
index c10f676701d..5c5e8cf5887 100644
--- a/core/src/OC/dialogs.js
+++ b/core/src/OC/dialogs.js
@@ -278,13 +278,13 @@ const Dialogs = {
} else {
builder.setButtonFactory((nodes, path) => {
const buttons = []
- const node = nodes?.[0]?.attributes?.displayName || nodes?.[0]?.basename
- const target = node || basename(path)
+ const [node] = nodes
+ const target = node?.displayname || node?.basename || basename(path)
if (type === FilePickerType.Choose) {
buttons.push({
callback: legacyCallback(callback, FilePickerType.Choose),
- label: node && !this.multiSelect ? t('core', 'Choose {file}', { file: node }) : t('core', 'Choose'),
+ label: node && !this.multiSelect ? t('core', 'Choose {file}', { file: target }) : t('core', 'Choose'),
type: 'primary',
})
}