Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
debug: try removing object.assign to service module
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelrk committed Sep 29, 2022
1 parent 5547f0b commit cae8aec
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ export const Netzo = (options: NetzoOptions) => {
// services: services(api)
services: async (_id: string) => {
const $item = await api.services[String(_id)].get()
const client = http($item.client)
// IMPORTANT: cannot spread a Proxy (...client) so use Object.assign
return Object.assign(client, {
$save: (data: any) => api.services[_id].patch<any>(data),
$item
})
return http($item.client)
}
}
};

0 comments on commit cae8aec

Please sign in to comment.