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 May 1, 2024
1 parent 53039db commit 18bad0c
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 18bad0c

Please sign in to comment.