Commit dbe30fbc162dec79300867f1038c8e6e3cc32d4f
1 parent
d69a95be
fix: validate priotiy will throw error
Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -13759,11 +13759,9 @@ class HandleDataSource { |
13759 | 13759 | * @param {} message |
13760 | 13760 | */ |
13761 | 13761 | updateCommonDataSource(message, record) { |
13762 | - // const { subscriptionId } = message | |
13763 | 13762 | const { nodeId, attr } = record |
13764 | 13763 | const node = this.getNodeByCmdId(nodeId) |
13765 | 13764 | |
13766 | - // const { attr } = this.getBindData(nodeId) | |
13767 | 13765 | node && this.updatePage(() => { |
13768 | 13766 | const { data } = message |
13769 | 13767 | const type = this.getComponentType(node) |
... | ... | @@ -13782,7 +13780,8 @@ class HandleDataSource { |
13782 | 13780 | return |
13783 | 13781 | } |
13784 | 13782 | |
13785 | - if (!data) return | |
13783 | + if (!data || !data[attr]) return | |
13784 | + | |
13786 | 13785 | const [[timespan, value]] = data[attr] |
13787 | 13786 | node.setValue(value) |
13788 | 13787 | }, node) |
... | ... | @@ -15177,6 +15176,7 @@ class HandleDynamicEffect { |
15177 | 15176 | validate(record, type, value) { |
15178 | 15177 | const { condition = [], attr } = record |
15179 | 15178 | const result = { condition: {}, flag: false } |
15179 | + if (!value[attr]) return result | |
15180 | 15180 | for (let i = 0; i < condition.length; i++) { |
15181 | 15181 | const { min, max } = condition[i] |
15182 | 15182 | const [timespan, realValue] = value[attr][0] | ... | ... |