fix: add null protection for LowcodeTypes.shape, to solve the error w…#1295
Closed
AndyJinSS wants to merge 0 commit intoalibaba:developfrom
Closed
fix: add null protection for LowcodeTypes.shape, to solve the error w…#1295AndyJinSS wants to merge 0 commit intoalibaba:developfrom
AndyJinSS wants to merge 0 commit intoalibaba:developfrom
Conversation
Codecov ReportBase: 86.15% // Head: 86.15% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## develop #1295 +/- ##
========================================
Coverage 86.15% 86.15%
========================================
Files 196 196
Lines 8578 8578
Branches 2065 2065
========================================
Hits 7390 7390
Misses 1104 1104
Partials 84 84 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Collaborator
|
您好,麻烦将分支指向 develop 分支 |
Contributor
Author
|
已调整 |
liujuping
reviewed
Nov 30, 2022
| @@ -1,9 +1,16 @@ | |||
| import '../../fixtures/window'; | |||
| import { parseMetadata } from '../../../src/builtin-simulator/utils/parse-metadata'; | |||
| import {parseMetadata} from '../../../src/builtin-simulator/utils/parse-metadata'; | |||
| it('parseMetadata', async () => { | ||
| const md1 = parseMetadata('Div'); | ||
| const md2 = parseMetadata({ componentName: 'Div' }); | ||
| const md2 = parseMetadata({componentName: 'Div'}); |
Collaborator
|
有两个小的格式问题,辛苦调整一下。另外提交后需要 rebase 一下,commit 只保留一条。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为LowcodeTypes.shape函数增加默认值,防止空值时的运行时错误。


这个问题出现在低代码引擎集成到@umijs/max项目并且版本号大于等4.0.30时,此版本引入react-helmet-async,这个包中有如下图1用法,最终导致在运行期间报错。报错如下图2。
报错如下