diff --git a/client/src/adc-core/fields/AuthorField.vue b/client/src/adc-core/fields/AuthorField.vue index 93d7df1c5..ad1d1da15 100644 --- a/client/src/adc-core/fields/AuthorField.vue +++ b/client/src/adc-core/fields/AuthorField.vue @@ -199,7 +199,7 @@ export default { ) { this.new_authors_paths = "noone"; } else if (Array.isArray(this.authors_paths)) { - this.new_authors_paths = this.new_authors_paths.reduce((acc, a) => { + this.new_authors_paths = this.authors_paths.reduce((acc, a) => { const author = this.getAuthor(a); if (author) acc.push(author.$path); return acc; diff --git a/client/src/mixins/Authors.js b/client/src/mixins/Authors.js index b3e47ae30..d74dae8f7 100644 --- a/client/src/mixins/Authors.js +++ b/client/src/mixins/Authors.js @@ -34,10 +34,7 @@ export default { return false; }, getAuthor(author_path) { - const folder_path = author_path.substring( - 0, - author_path.lastIndexOf("/") - ); + const folder_path = this.getParent(author_path); if (!folder_path || !this.$api.store[folder_path]) return false; return this.$api.store[folder_path].find((f) => f.$path === author_path); },