Skip to content

Commit

Permalink
fix: nullify computed tokens in map
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Sep 3, 2024
1 parent 0fbb3b7 commit 911363a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/formats/map.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { Dictionary, Format } from 'style-dictionary/types';

import { fileHeader } from 'style-dictionary/utils';
import { isThemeColorToken } from '../predicates.ts';

const makeEntries = (dictionary: Dictionary) =>
dictionary.allTokens.map(x => [`--${x.name}`, x.$value]);
dictionary.allTokens.map(x => [`--${x.name}`, isThemeColorToken(x) ? null : x.$value]);

const makeMetaEntries = (dictionary: Dictionary) =>
dictionary.allTokens.map(x => [`--${x.name}`, x]);
Expand Down

0 comments on commit 911363a

Please sign in to comment.