Skip to content

Commit

Permalink
Merge pull request #2 from clevyr/remove-lodash-dependency
Browse files Browse the repository at this point in the history
fix: remove dependency on lodash
  • Loading branch information
fritz-c authored Aug 30, 2024
2 parents f7caed5 + 1d82018 commit bb078e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions resources/js/components/DetailField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ export default {
* Gather the action FormData for the given action.
*/
actionFormData() {
return _.tap(new FormData(), (formData) => {
formData.append('resources', this.selectedResources);
_.each(this.selectedAction.fields, (field) => {
field.fill(formData);
});
const formData = new FormData();
formData.append('resources', this.selectedResources);
(this.selectedAction.fields || []).forEach((field) => {
field.fill(formData);
});
return formData;
},
/**
Expand Down
12 changes: 6 additions & 6 deletions resources/js/components/IndexField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ export default {
* Gather the action FormData for the given action.
*/
actionFormData() {
return _.tap(new FormData(), (formData) => {
formData.append('resources', this.selectedResources);
_.each(this.selectedAction.fields, (field) => {
field.fill(formData);
});
const formData = new FormData();
formData.append('resources', this.selectedResources);
(this.selectedAction.fields || []).forEach((field) => {
field.fill(formData);
});
return formData;
},
/**
Expand Down

0 comments on commit bb078e2

Please sign in to comment.