diff --git a/package.json b/package.json index 6a9076a7..e10c209f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yearn-finance/web-lib", - "version": "4.0.4", + "version": "4.0.5", "main": "./dist/index.js", "types": "./dist/index.d.js", "files": [ diff --git a/src/hooks/useFetchYearnVaults.ts b/src/hooks/useFetchYearnVaults.ts index aebe81d2..a00fa812 100644 --- a/src/hooks/useFetchYearnVaults.ts +++ b/src/hooks/useFetchYearnVaults.ts @@ -81,6 +81,9 @@ function useFetchYearnVaults(chainIDs?: number[] | undefined): { }, [vaultsMigrations]); const vaultsRetiredObject = useDeepCompareMemo((): TDict => { + if (!vaultsRetired) { + return {}; + } const _retiredVaultsObject = (vaultsRetired || []).reduce( (acc: TDict, vault): TDict => { acc[toAddress(vault.address)] = vault;