Skip to content

Commit 0a84f5d

Browse files
committed
fix(edit): check body length after clear with remove internals
1 parent d2961e9 commit 0a84f5d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/methods/edit.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ export default (self, _id, body, canUpdateInternals = false) => {
3838
const { ecomAuth } = self
3939

4040
const updateAppData = (subresource, data) => {
41-
if (data && typeof data === 'object' && Object.keys(data).length) {
41+
if (data && typeof data === 'object') {
4242
if (!canUpdateInternals) {
4343
data = removeInternals(data)
4444
}
45-
promises.push(ecomAuth.requestApi(`/applications/${_id}/${subresource}.json`, method, data))
45+
if (Object.keys(data).length) {
46+
promises.push(ecomAuth.requestApi(`/applications/${_id}/${subresource}.json`, method, data))
47+
}
4648
}
4749
}
4850

0 commit comments

Comments
 (0)