Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #129 from gluestack/release/@dank-style/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit-tailor authored Apr 14, 2023
2 parents 62ca895 + f0c7a84 commit 595abfb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@dank-style/react": "0.3.12",
"@dank-style/react": "0.3.13",
"@storybook/addon-actions": "^6.5.14",
"@storybook/addon-controls": "^6.5.14",
"@storybook/addon-docs": "^6.5.15",
Expand Down
6 changes: 6 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @dank-style/react

## 0.3.13

### Patch Changes

- Optional chaining in token resolution

## 0.3.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dank-style/react",
"version": "0.3.12",
"version": "0.3.13",
"main": "lib/commonjs/index",
"types": "lib/typescript/index.d.ts",
"module": "lib/module/index",
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export function resolveStringToken(
config?.tokens[token_scale] &&
config?.tokens[token_scale].hasOwnProperty(splitCurrentToken[0])
) {
const tokenValue = config?.tokens[token_scale][splitCurrentToken[0]];
const tokenValue =
config?.tokens?.[token_scale]?.[splitCurrentToken[0]];
typeofResult = typeof tokenValue;

if (typeof tokenValue !== 'undefined' && tokenValue !== null) {
Expand Down

0 comments on commit 595abfb

Please sign in to comment.