Skip to content

Commit

Permalink
fix(core): write getter default parameter instead of optional parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Jul 1, 2021
1 parent 25665f0 commit 6ebb571
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"index.js": {
"bundled": 21254,
"minified": 10166,
"gzipped": 3349,
"bundled": 21262,
"minified": 10169,
"gzipped": 3353,
"treeshaked": {
"rollup": {
"code": 14,
Expand All @@ -28,9 +28,9 @@
}
},
"devtools.js": {
"bundled": 19114,
"minified": 9535,
"gzipped": 3277,
"bundled": 19122,
"minified": 9538,
"gzipped": 3281,
"treeshaked": {
"rollup": {
"code": 28,
Expand Down
5 changes: 4 additions & 1 deletion src/core/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ const writeAtomState = <Value, Update>(
})
return
}
const writeGetter: WriteGetter = (a: AnyAtom, unstable_promise?: boolean) => {
const writeGetter: WriteGetter = (
a: AnyAtom,
unstable_promise: boolean = false
) => {
const aState = readAtomState(state, a)
if (aState.e) {
throw aState.e // read error
Expand Down

0 comments on commit 6ebb571

Please sign in to comment.