Skip to content

Commit

Permalink
FIX #1036
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-ev committed Dec 20, 2024
1 parent 4be9400 commit 6964a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/adc-core/fields/AuthorField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 1 addition & 4 deletions client/src/mixins/Authors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down

0 comments on commit 6964a38

Please sign in to comment.