Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
linjiajian999 committed Apr 9, 2024
1 parent 9ceaef6 commit 0f493c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vanilla/store2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const createContinuablePromise = <T>(
let continuePromise: ContinuePromise<T>
const p: any = new Promise((resolve, reject) => {
let curr = promise
const onFullfilled = (me: PromiseLike<T>) => (v: T) => {
const onFulfilled = (me: PromiseLike<T>) => (v: T) => {
if (curr === me) {
p.status = FULFILLED
p.value = v
Expand All @@ -136,12 +136,12 @@ const createContinuablePromise = <T>(
complete()
}
}
promise.then(onFullfilled(promise), onRejected(promise))
promise.then(onFulfilled(promise), onRejected(promise))
continuePromise = (nextPromise, nextAbort) => {
if (nextPromise) {
continuablePromiseMap.set(nextPromise, p)
curr = nextPromise
nextPromise.then(onFullfilled(nextPromise), onRejected(nextPromise))
nextPromise.then(onFulfilled(nextPromise), onRejected(nextPromise))
}
abort()
abort = nextAbort
Expand Down

0 comments on commit 0f493c2

Please sign in to comment.