From 82d81f76a84faf1e7b1c6421536ae453f33c0d4d Mon Sep 17 00:00:00 2001 From: gitdagray Date: Mon, 11 Apr 2022 08:34:18 -0500 Subject: [PATCH] Insured onAuthorChanged saves numeric value instead of a string value --- 04_lesson/src/features/posts/EditPostForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04_lesson/src/features/posts/EditPostForm.js b/04_lesson/src/features/posts/EditPostForm.js index d0e6bdf..34423cd 100644 --- a/04_lesson/src/features/posts/EditPostForm.js +++ b/04_lesson/src/features/posts/EditPostForm.js @@ -29,7 +29,7 @@ const EditPostForm = () => { const onTitleChanged = e => setTitle(e.target.value) const onContentChanged = e => setContent(e.target.value) - const onAuthorChanged = e => setUserId(e.target.value) + const onAuthorChanged = e => setUserId(Number(e.target.value)) const canSave = [title, content, userId].every(Boolean) && requestStatus === 'idle';