Skip to content

Commit fbe6810

Browse files
committed
Fixed multiplying by value in Quantity projector, should be just units
1 parent 4dfdd69 commit fbe6810

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chainrules.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212

1313
function (projector::ProjectTo{<:Quantity})(x::Number)
1414
new_val = projector.project_val(ustrip(x))
15-
return new_val*x
15+
return new_val*unit(x)
1616
end
1717

1818
# Project Unitful Quantities onto numerical types by projecting the value and carrying units

0 commit comments

Comments
 (0)