Skip to content

Commit 61a7fe1

Browse files
committed
Merge branch 'main' of https://github.com/ModiaSim/Modia.jl
2 parents e85ae93 + 9dca65e commit 61a7fe1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ModelCollections.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -523,15 +523,15 @@ function flattenModelTuple!(model, modelStructure, modelName, to; unitless = fal
523523
end
524524
elseif isCollection(v) && v[:_class] in [:Var] ||
525525
typeof(v) <: AbstractDict && :variable in keys(v) && v[:variable]
526-
if :init in keys(v)
526+
if :init in keys(v) && !isnothing(v[:init])
527527
x0 = v[:init]
528528
if unitless && typeof(x0) != Expr
529529
x0 = ustrip.(x0)
530530
end
531531
modelStructure.init[subMod] = x0
532532
modelStructure.mappedParameters[k] = x0
533533
end
534-
if :start in keys(v)
534+
if :start in keys(v) && !isnothing(v[:start])
535535
s0 = v[:start]
536536
if unitless && typeof(s0) != Expr
537537
s0 = ustrip.(s0)

0 commit comments

Comments
 (0)