8000 fix: add null protection for LowcodeTypes.shape, to solve the error w… by AndyJinSS · Pull Request #1295 · alibaba/lowcode- 8000 engine · GitHub
[go: up one dir, main page]

Skip to content

fix: add null protection for LowcodeTypes.shape, to solve the error w…#1295

Closed
AndyJinSS wants to merge 0 commit intoalibaba:developfrom
AndyJinSS:main
Closed

fix: add null protection for LowcodeTypes.shape, to solve the error w…#1295
AndyJinSS wants to merge 0 commit intoalibaba:developfrom
AndyJinSS:main

Conversation

@AndyJinSS
Copy link
Contributor

为LowcodeTypes.shape函数增加默认值,防止空值时的运行时错误。
这个问题出现在低代码引擎集成到@umijs/max项目并且版本号大于等4.0.30时,此版本引入react-helmet-async,这个包中有如下图1用法,最终导致在运行期间报错。报错如下图2。
image
报错如下
image

@CLAassistant
Copy link
CLAassistant commented Nov 29, 2022

CLA assistant check
All committers have signed the CLA.

@JackLian JackLian requested review from liujuping and removed request for JackLian November 29, 2022 06:55
@codecov
10000 Copy link
codecov bot commented Nov 29, 2022

Codecov Report

Base: 86.15% // Head: 86.15% // No change to project coverage 👍

Coverage data is based on head (c88edf5) compared to base (b2af5b2).
Patch has no changes to coverable lines.

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@liujuping
Copy link
Collaborator

您好,麻烦将分支指向 develop 分支

@AndyJinSS AndyJinSS changed the base branch from main to develop November 29, 2022 08:18
@AndyJinSS
Copy link
Contributor Author

已调整

@@ -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';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的格式不用调整。

it('parseMetadata', async () => {
const md1 = parseMetadata('Div');
const md2 = parseMetadata({ componentName: 'Div' });
const md2 = parseMetadata({componentName: 'Div'});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的格式也不用调整,辛苦恢复一下。

@liujuping
Copy link
Collaborator

有两个小的格式问题,辛苦调整一下。另外提交后需要 rebase 一下,commit 只保留一条。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0