Skip to content

Commit 28b4e94

Browse files
authored
Merge pull request #1745 from wsphillips/wsp/getvarobservedfix
return the lhs instead of observable equation from `getvar`
2 parents 1392a7c + 6108b3d commit 28b4e94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systems/abstractsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ function getvar(sys::AbstractSystem, name::Symbol; namespace = false)
309309
obs = get_observed(sys)
310310
i = findfirst(x -> getname(x.lhs) == name, obs)
311311
if i !== nothing
312-
return namespace ? renamespace(sys, obs[i]) : obs[i]
312+
return namespace ? renamespace(sys, obs[i].lhs) : obs[i].lhs
313313
end
314314
end
315315

0 commit comments

Comments
 (0)