Skip to content

Commit

Permalink
🩹 (#2345): prevent error when file is undefined
Browse files Browse the repository at this point in the history
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
  • Loading branch information
Vinicius Reis committed May 30, 2022
1 parent 3286d1b commit 08ef254
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/views/RichWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ export default {
return (!this.file || (this.autofocus && !this.ready)) && this.canCreate
},
filepath() {
const { path, name } = this.file
const { path, name } = this.file || {}
if (!path) {
return undefined
}

return path + (path.endsWith('/') ? '' : '/') + name
},
},
Expand Down

0 comments on commit 08ef254

Please sign in to comment.