Closed
Description
Since last update I'm getting hasOwnProperty is not a function
I used to create a payload with differences to be sent to my API through axios:
const diffs = diff(originalResource.value, resource.value)
const payload = {
...(diffs.hasOwnProperty('name') && { name: resource.value.name }),
...(diffs.hasOwnProperty('slug') && { slug: resource.value.slug }),
...(diffs.hasOwnProperty('visible') && { visible: resource.value.visible }),
...(diffs.hasOwnProperty('postCategory') && { post_category_id: resource.value.postCategory?.id || null }),
...(diffs.hasOwnProperty('parent') && { parent_id: resource.value.parent?.id || null })
}
Did anything change in regards to returned response from method diff()
. In that case, how can I get diff()
properties changed in order to create a new payload object?
Metadata
Metadata
Assignees
Labels
No labels