Skip to content

Commit 2256b75

Browse files
authored
Attempted fix for solitaire drag-and-drop (#2227)
DOES NOT actually fix solitaire drag-and-drop bug, but is nevertheless an improvement to correctness. // Bug: .delete loses 'this' binding when passed directly to forEach .forEach(this.resultRecipeCache.delete); // Fix: Wrap in arrow function to preserve binding .forEach((key) => this.resultRecipeCache.delete(key));
1 parent 72686e5 commit 2256b75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runner/src/runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class Runner implements IRunner {
9595
// copy keys, since we'll mutate the collection while iterating
9696
const cacheKeys = [...this.resultRecipeCache.keys()];
9797
cacheKeys.filter((key) => key.startsWith(`${notification.space}/`))
98-
.forEach(this.resultRecipeCache.delete);
98+
.forEach((key) => this.resultRecipeCache.delete(key));
9999
}
100100
return { done: false };
101101
},

0 commit comments

Comments
 (0)