Skip to content

Commit

Permalink
Merge pull request #54 from gadingnst/v2.1.1
Browse files Browse the repository at this point in the history
[RELEASE] v.2.1.1
  • Loading branch information
Gading Nasution authored Dec 19, 2022
2 parents f838091 + 2245ca8 commit 46cf48e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swr-global-state",
"version": "2.1.0",
"version": "2.1.1",
"author": "Sutan Gading Fadhillah Nasution <[email protected]>",
"description": "Zero-setup & simple global state management for React Components",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/swr-global-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "swr-global-state",
"author": "Sutan Gading Fadhillah Nasution <[email protected]>",
"description": "Zero-setup & simple global state management for React Components",
"version": "2.1.0",
"version": "2.1.1",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/swr-global-state/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function useStore<T, E = any>(data: StoreParams<T>, swrConfig?: SWRConfig
export function createStore<T, E = any>(data: StoreParams<T>, swrConfig?: SWRConfiguration) {
return (initial?: T) => useStore<T, E>({
...data,
initial: initial || data.initial
initial: initial ?? data.initial
}, swrConfig);
}

Expand Down

1 comment on commit 46cf48e

@vercel
Copy link

@vercel vercel bot commented on 46cf48e Dec 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.