Match-id-000c5a44201f32aaf686103f6f2cfd5d51739418
This commit is contained in:
commit
f7c1223082
|
@ -1,4 +1,7 @@
|
|||
## 0.0.34 (2023-01-11)
|
||||
## 0.0.35 (2023-01-28)
|
||||
- **core**: 在 cloneDeep JSXElement 的时候会出现死循环
|
||||
|
||||
## 0.0.34 (2023-01-19)
|
||||
- **core**: #95 新增jsx接口
|
||||
- **core**: #96 #97 fix testing-library 的UT错误
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"keywords": [
|
||||
"horizon"
|
||||
],
|
||||
"version": "0.0.34",
|
||||
"version": "0.0.35",
|
||||
"homepage": "",
|
||||
"bugs": "",
|
||||
"main": "index.js",
|
||||
|
|
|
@ -37,11 +37,18 @@ export function JSXElement(type, key, ref, vNode, props, source: Source | null)
|
|||
props: props,
|
||||
|
||||
// 所属的class组件
|
||||
belongClassVNode: vNode,
|
||||
belongClassVNode: null,
|
||||
};
|
||||
|
||||
// 在 cloneDeep JSXElement 的时候会出现死循环,需要设置belongClassVNode的enumerable为false
|
||||
Object.defineProperty(ele, 'belongClassVNode', {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
value: vNode,
|
||||
});
|
||||
|
||||
if (isDev) {
|
||||
// 为了test判断两个JSXElement对象是否相等时忽略src属性,需要设置src的enumerable为false
|
||||
// 为了test判断两个 JSXElement 对象是否相等时忽略src属性,需要设置src的enumerable为false
|
||||
Object.defineProperty(ele, 'src', {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
|
|
Loading…
Reference in New Issue