Skip to content

Commit

Permalink
Merge pull request #336 from rulfo71/fix/317-vote-detail-not-showing
Browse files Browse the repository at this point in the history
Fix 317/ Vote detail not showing
  • Loading branch information
rulfo71 authored Mar 24, 2023
2 parents 166426b + 96f3bfb commit 3c8faa2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export const checkDataSourceAvailability = async chainId => {
);
const { data, errors } = await response.json();

if (data?._meta?.block?.timestamp < Math.floor(Date.now() / 1000) - 600) {
if (
data?._meta?.block?.timestamp !== null &&
data?._meta?.block?.timestamp < Math.floor(Date.now() / 1000) - 600
) {
console.debug('Subgraph out of sync, using fallback');
return false;
}
Expand Down

1 comment on commit 3c8faa2

@vercel
Copy link

@vercel vercel bot commented on 3c8faa2 Mar 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.