Skip to content

Commit a78a542

Browse files
committed
chore: small fix for platform config usage
1 parent 9c02741 commit a78a542

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/register.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function register(sd: typeof StyleDictionary, transformOpts?: Trans
7373
type: 'value',
7474
transitive: true,
7575
filter: token => ['string', 'object'].includes(typeof (token.$value ?? token.value)),
76-
transform: (token, config) => checkAndEvaluateMath(token, config.options?.mathFractionDigits),
76+
transform: (token, platformCfg) => checkAndEvaluateMath(token, platformCfg.mathFractionDigits),
7777
});
7878

7979
sd.registerTransform({

test/spec/checkAndEvaluateMath.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ describe('check and evaluate math', () => {
127127
platforms: {
128128
css: {
129129
transformGroup: 'tokens-studio',
130-
options: {
131-
mathFractionDigits: 3,
132-
},
130+
mathFractionDigits: 3,
133131
files: [
134132
{
135133
format: 'css/variables',

0 commit comments

Comments
 (0)