Skip to content

Commit 3aea904

Browse files
committed
fix: avoid nested loaders in setup
1 parent 5d84bd7 commit 3aea904

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/data-loaders/defineColadaLoader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ export function defineColadaLoader<Data, isLazy extends boolean>(
437437
// otherwise this will end up in "Unhandled promise rejection"
438438
.catch((e) => (parentEntry ? Promise.reject(e) : null))
439439

440-
// Restore the context: shouldn't be needed
441-
// setCurrentContext(currentEntry)
440+
// Restore the context to avoid sequential calls to be nested
441+
setCurrentContext(currentEntry)
442442
return assign(promise, useDataLoaderResult)
443443
}
444444

0 commit comments

Comments
 (0)