Skip to content
This repository was archived by the owner on Jul 22, 2020. It is now read-only.

[WIP]fix: no-op when patchValue receive undefined#26

Open
wjw99830 wants to merge 3 commits intozent-contrib:masterfrom
wjw99830:hotfix/patch-value_20200528
Open

[WIP]fix: no-op when patchValue receive undefined#26
wjw99830 wants to merge 3 commits intozent-contrib:masterfrom
wjw99830:hotfix/patch-value_20200528

Conversation

@wjw99830
Copy link
Copy Markdown
Contributor

调用父级字段(SetArrayForm)的patchValue时,由于参数是Partial的,因此各个Field有可能会接收到undefined,但是内部调用的patchValue躲过了类型检查,因此这里会出现类型不正确的情况。

体现在业务中就是调用form.patchValue时某个field值由于某种原因为undefined,此处不会提示类型错误,但访问fieldModel.value时出现了预期之外的undefined

@wjw99830 wjw99830 changed the title fix: no-op when patchValue receive undefined [WIP]fix: no-op when patchValue receive undefined Jun 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant