From c342ae5dca6ed4f89315d00c3f610799a03c60c0 Mon Sep 17 00:00:00 2001 From: Carl Osterwisch Date: Fri, 22 Dec 2023 21:55:22 -0600 Subject: [PATCH] Convert value using to() if needed --- src/type/unit/Unit.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/type/unit/Unit.js b/src/type/unit/Unit.js index 9379460203..b45891f96a 100644 --- a/src/type/unit/Unit.js +++ b/src/type/unit/Unit.js @@ -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 }