@@ -151,9 +151,9 @@ export default {
151151 .build ()
152152
153153 filePicker .pick ()
154- .then ((files ) => {
154+ .then ((file ) => {
155155 const client = OC .Files .getClient ()
156- client .getFileInfo (files[ 0 ] ).then ((_status , fileInfo ) => {
156+ client .getFileInfo (file ).then ((_status , fileInfo ) => {
157157 const url = new URL (generateUrl (` /f/${ fileInfo .id } ` ), window .origin )
158158 this .setLink (url .href , fileInfo .name )
159159 this .startPath = fileInfo .path + (fileInfo .type === ' dir' ? ` /${ fileInfo .name } /` : ' ' )
@@ -165,7 +165,6 @@ export default {
165165 this .$refs .buttonFile ? .$el .focus ()
166166 })
167167 },
168-
169168 /**
170169 * Allow user to enter an URL manually
171170 * Triggered when by the "link url" button
@@ -187,7 +186,6 @@ export default {
187186 }
188187 this .isInputMode = true
189188 },
190-
191189 /**
192190 * Save user entered URL as a link markup
193191 * Triggered when the user submits the ActionInput
@@ -232,7 +230,6 @@ export default {
232230 }
233231 chain .focus ().run ()
234232 },
235-
236233 /**
237234 * Remove link markup at current position
238235 * Triggered by the "remove link" button
@@ -241,7 +238,6 @@ export default {
241238 this .$editor .chain ().unsetLink ().focus ().run ()
242239 this .menuOpen = false
243240 },
244-
245241 linkPicker () {
246242 getLinkWithPicker (null , true )
247243 .then (link => {
0 commit comments