Skip to content

Commit

Permalink
fix: lastProviderError can be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Jun 14, 2023
1 parent 632f98e commit c721a90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/property-provider/src/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { ProviderError } from "./ProviderError";
export const chain =
<T>(...providers: Array<Provider<T>>): Provider<T> =>
async () => {
let lastProviderError: Error;
let lastProviderError: Error | undefined;

for (const provider of providers) {
try {
const credentials = await provider();
Expand Down

0 comments on commit c721a90

Please sign in to comment.