File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @preact/signals-core " : patch
3
+ ---
4
+
5
+ Fix incorrectly named variables and address typos in code comments.
Original file line number Diff line number Diff line change @@ -111,10 +111,10 @@ export class Signal<T = any> {
111
111
// Any leftover dependencies here are not needed anymore
112
112
if ( shouldCleanup ) {
113
113
// Unsubscribe from dependencies that were not accessed:
114
- oldDeps . forEach ( sub => unsubscribe ( this , sub ) ) ;
114
+ oldDeps . forEach ( dep => unsubscribe ( this , dep ) ) ;
115
115
} else {
116
- // Re-subscribe to dependencies that not accessed:
117
- oldDeps . forEach ( sub => subscribe ( this , sub ) ) ;
116
+ // Re-subscribe to dependencies that were not accessed:
117
+ oldDeps . forEach ( dep => subscribe ( this , dep ) ) ;
118
118
}
119
119
120
120
oldDeps . clear ( ) ;
@@ -198,7 +198,7 @@ const tmpPending: Signal[] = [];
198
198
* Refresh _just_ this signal and its dependencies recursively.
199
199
* All other signals will be left untouched and added to the
200
200
* global queue to flush later. Since we're traversing "upwards",
201
- * we don't have to car about topological sorting.
201
+ * we don't have to care about topological sorting.
202
202
*/
203
203
function refreshStale ( signal : Signal ) {
204
204
pending . delete ( signal ) ;
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ describe("computed()", () => {
361
361
362
362
// top to bottom
363
363
expect ( eSpy ) . to . have . been . calledBefore ( fSpy ) ;
364
- // right to left
364
+ // left to right
365
365
expect ( fSpy ) . to . have . been . calledBefore ( gSpy ) ;
366
366
} ) ;
367
367
@@ -650,7 +650,7 @@ describe("batch/transaction", () => {
650
650
const spyD = sinon . spy ( ( ) => c . value ) ;
651
651
const d = computed ( spyD ) ;
652
652
653
- const spyE = sinon . spy ( ( ) => b . value ) ;
653
+ const spyE = sinon . spy ( ( ) => d . value ) ;
654
654
const e = computed ( spyE ) ;
655
655
656
656
spyC . resetHistory ( ) ;
You can’t perform that action at this time.
0 commit comments