Skip to content

Commit 18cc951

Browse files
fix: handle nothing sys in namespace_expr
1 parent 2ecbdb2 commit 18cc951

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/systems/abstractsystem.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,9 @@ function is_array_of_symbolics(x)
11691169
end
11701170

11711171
function namespace_expr(
1172-
O, sys, n = nameof(sys); ivs = independent_variables(sys))
1172+
O, sys, n = (sys === nothing ? nothing : nameof(sys));
1173+
ivs = sys === nothing ? nothing : independent_variables(sys))
1174+
sys === nothing && return O
11731175
O = unwrap(O)
11741176
# Exceptions for arrays of symbolic and Ref of a symbolic, the latter
11751177
# of which shows up in broadcasts

0 commit comments

Comments
 (0)