Skip to content

Commit

Permalink
fix: don't screen unit for a Unitful unit
Browse files Browse the repository at this point in the history
`__get_literal_unit` already screens units of DynamicQuantity.AbstractQuantity. So this check is redundant.
Also, removing this check fixes the issue with `get_unit` for units of Unitful type.
  • Loading branch information
ven-k committed Apr 30, 2024
1 parent e2da1f4 commit 5956a70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/systems/unit_check.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ end

function get_unit(x::Symbolic)
if (u = __get_literal_unit(x)) !== nothing
screen_unit(u)
u
elseif issym(x)
get_literal_unit(x)
elseif isadd(x)
Expand Down

0 comments on commit 5956a70

Please sign in to comment.