Skip to content

Commit

Permalink
fix: avoid nested loaders in setup
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jul 30, 2024
1 parent 5d84bd7 commit 3aea904
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data-loaders/defineColadaLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ export function defineColadaLoader<Data, isLazy extends boolean>(
// otherwise this will end up in "Unhandled promise rejection"
.catch((e) => (parentEntry ? Promise.reject(e) : null))

// Restore the context: shouldn't be needed
// setCurrentContext(currentEntry)
// Restore the context to avoid sequential calls to be nested
setCurrentContext(currentEntry)
return assign(promise, useDataLoaderResult)
}

Expand Down

0 comments on commit 3aea904

Please sign in to comment.