1
0
mirror of synced 2026-03-25 20:58:38 +08:00

fix(data-source): 组件配置与条件关联了不同数据源时,编译问题

This commit is contained in:
roymondchen
2023-09-20 19:11:03 +08:00
parent 740c2a73fa
commit 36988cd3e0
3 changed files with 22 additions and 23 deletions

View File

@@ -163,7 +163,14 @@ class DataSourceManager extends EventEmitter {
let result = true;
for (const { op, value, range, field } of cond) {
const [sourceId, fieldKey] = field;
const fieldValue = this.data[sourceId][fieldKey];
const dsData = this.data[sourceId];
if (!dsData || !fieldKey) {
break;
}
const fieldValue = dsData[fieldKey];
if (!compiledCond(op, fieldValue, value, range)) {
result = false;
break;