Skip to content

Commit 51975bf

Browse files
committed
fix typo of whileWatched name
1 parent 75f85cb commit 51975bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/store/src/atom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function removeWatch(node: WatchableNode) {
9191
* Causes `fn` to be called when `node` becomes gains its first live subscriber.
9292
* If `fn` returns a cleanup function, it will be called when `node` loses its last live subscriber.
9393
*/
94-
export function whiteWatched(node: WatchableNode, fn: WatchedEffect) {
94+
export function whileWatched(node: WatchableNode, fn: WatchedEffect) {
9595
const initialEffects = (node._watchEffects ??= [])
9696
initialEffects.push(fn)
9797
if (node._watches) {
@@ -375,7 +375,7 @@ export function createAtom<T>(
375375
},
376376

377377
whileWatched(listener: WatchedEffect): () => void {
378-
return whiteWatched(this, listener)
378+
return whileWatched(this, listener)
379379
},
380380

381381
_update(getValue?: T | ((snapshot: T) => T)): boolean {

0 commit comments

Comments
 (0)