fix(vision-polyfill): 当前值是 JSSlot 类型,传入相对应的 slotNode

This commit is contained in:
lihao.ylh 2022-04-20 14:35:11 +08:00
parent 7454572790
commit 6ccee9941f

View File

@ -47,6 +47,10 @@ export function compatibleReducer(props: any, node: Node): any {
// newProps[key] = props[key];
// return;
// }
// 假如当前值是 JSSlot 类型,优先传入相对应的 slotNode
if (isJSSlot(val)) {
node = node.getProp(key)?.slotNode || node;
}
newProps[key] = compatibleReducer(val, node);
});
return newProps;