Skip to content

Commit

Permalink
Convert value using to() if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
costerwi committed Dec 23, 2023
1 parent 89f2f58 commit c342ae5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/type/unit/Unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1022,9 +1022,13 @@ export const createUnitClass = /* #__PURE__ */ factory(name, dependencies, ({
// Replace this unit list with the proposed list
ret.units = proposedUnitList

ret.value = null
ret.fixPrefix = true
ret.skipAutomaticSimplification = true

if (this.value !== null) {
return this.to(ret)
}
return ret
}

Expand Down

0 comments on commit c342ae5

Please sign in to comment.