Skip to content

Commit

Permalink
fix: loader derived state
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Jul 28, 2023
1 parent e4afbac commit b1f001d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/loaders/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ export class LoaderClient<
const isLoading = (
Object.values(this.__store.state.loaders) as LoaderState[]
).some((loader) => {
return Object.values(loader.instances).some(
return Object.values(loader.instances || {}).some(
(instance) => instance.isFetching && !instance.preload,
)
})

const isPreloading = (
Object.values(this.loaders) as LoaderState[]
).some((loader) => {
return Object.values(loader.instances).some(
return Object.values(loader.instances || {}).some(
(instance) => instance.isFetching && instance.preload,
)
})
Expand Down

0 comments on commit b1f001d

Please sign in to comment.