nextProps.data 为 undefined 的问题修复

This commit is contained in:
liaoxuezhi 2019-08-12 09:58:57 +08:00 committed by catchonme
parent 2621a13a8a
commit e5da3a7446

View File

@ -633,7 +633,7 @@ export function HocStoreFactory(renderer:{
// todo fix: dialog 种数据从孩子 form 同步过来后,会走这个逻辑让 form 更新 data会导致里面的 __prev 丢失。
store.initData(newData);
} else if ((nextProps.data as any).__super) {
} else if (nextProps.data && (nextProps.data as any).__super) {
store.initData(extendObject(nextProps.data));
} else {
store.initData(createObject(nextProps.scope, nextProps.data));