diff --git a/src/register.ts b/src/register.ts index 169812e..28feec4 100644 --- a/src/register.ts +++ b/src/register.ts @@ -73,7 +73,7 @@ export async function register(sd: typeof StyleDictionary, transformOpts?: Trans type: 'value', transitive: true, filter: token => ['string', 'object'].includes(typeof (token.$value ?? token.value)), - transform: (token, config) => checkAndEvaluateMath(token, config.options?.mathFractionDigits), + transform: (token, platformCfg) => checkAndEvaluateMath(token, platformCfg.mathFractionDigits), }); sd.registerTransform({ diff --git a/test/spec/checkAndEvaluateMath.spec.ts b/test/spec/checkAndEvaluateMath.spec.ts index 9f5b63e..ee3cb6e 100644 --- a/test/spec/checkAndEvaluateMath.spec.ts +++ b/test/spec/checkAndEvaluateMath.spec.ts @@ -127,9 +127,7 @@ describe('check and evaluate math', () => { platforms: { css: { transformGroup: 'tokens-studio', - options: { - mathFractionDigits: 3, - }, + mathFractionDigits: 3, files: [ { format: 'css/variables',