Skip to content

Commit

Permalink
make sure all get requests return an object w/ list property
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaehring committed May 17, 2019
1 parent 03e95ee commit feeaf98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function farmOS(host, user, password) {
.then((response) => {
const lastPage = +(new URL(response.last)).searchParams.get('page');
if (page === lastPage) {
resolve(list.concat(response.list));
resolve({ list: list.concat(response.list) });
return;
}
const newList = list.concat(response.list);
Expand Down

0 comments on commit feeaf98

Please sign in to comment.