Skip to content

Commit

Permalink
fix: fixed the bug that value can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
daixianceng committed Nov 17, 2018
1 parent 2a44e41 commit 11601a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/common/functions.ts
Expand Up @@ -52,7 +52,7 @@ export function convertModelToFormData(model: Object, formName?: string | undefi
if (['string', 'number', 'boolean'].includes(typeof item.value)) {
formData.append(key, String(item.value));
}
if ('object' === typeof item.value) {
if ('object' === typeof item.value && item.value) {
convertModelToFormData(item.value, key, formData);
}
});
Expand Down

0 comments on commit 11601a1

Please sign in to comment.