Ver código fonte

fix(关系): 优化固定值的判断

value为空时可能抛出异常
zhangji 2 anos atrás
pai
commit
015df6d6c9

+ 1 - 1
jetlinks-components/relation-component/src/main/java/org/jetlinks/community/relation/utils/VariableSource.java

@@ -111,7 +111,7 @@ public class VariableSource implements Serializable {
                                 ConfigKey<?> propertyPath) {
         validate();
         if (getSource() == VariableSource.Source.fixed) {
-            return CastUtils.flatStream(Flux.just(value));
+            return value == null ? Flux.empty() : CastUtils.flatStream(Flux.just(value));
         }
         if (getSource() == VariableSource.Source.upper) {
             return Mono