Skip to content

Commit

Permalink
fix(stackPrefetch): disable function not working (#793)
Browse files Browse the repository at this point in the history
Co-authored-by: Tristan ROBIN <tristanr@median365.com>
  • Loading branch information
TristanMedian and Tristan ROBIN committed Sep 21, 2023
1 parent 52dfab9 commit 7ced76e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/tools/src/utilities/stackPrefetch/stackPrefetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ function getPromiseRemovedHandler(element) {

if (
!stackPrefetchData ||
!stackPrefetchData.data ||
!stackPrefetchData.data.length
!stackPrefetchData.indicesToRequest ||
!stackPrefetchData.indicesToRequest.length
) {
return;
}
Expand Down Expand Up @@ -392,7 +392,7 @@ function disable(element) {
const stackPrefetchData = getToolState(element);
// If there is actually something to disable, disable it

if (stackPrefetchData && stackPrefetchData.data.length) {
if (stackPrefetchData && stackPrefetchData.indicesToRequest.length) {
stackPrefetchData.enabled = false;

// Clear current prefetch requests from the requestPool
Expand Down

0 comments on commit 7ced76e

Please sign in to comment.