From b1e30e0d3d8c1b9112611e3f7653c1041e8f3b96 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 1 Apr 2024 12:42:23 +0100 Subject: [PATCH] Theming API: Fixed `value` key issue --- components/lib/themes/utils/sharedUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/lib/themes/utils/sharedUtils.js b/components/lib/themes/utils/sharedUtils.js index 72e370731..d58750e2a 100644 --- a/components/lib/themes/utils/sharedUtils.js +++ b/components/lib/themes/utils/sharedUtils.js @@ -86,7 +86,8 @@ export default { return false; }, toValue(value) { - return this.isObject(value) && value.hasOwnProperty('value') ? value.value : value; + // Check for Figma (value-type) + return this.isObject(value) && value.hasOwnProperty('value') && value.hasOwnProperty('type') ? value.value : value; }, toUnit(value, variable = '') { const excludedProperties = ['opacity', 'z-index', 'line-height', 'font-weight', 'flex', 'flex-grow', 'flex-shrink', 'order'];