Skip to content

Commit

Permalink
fix: Extra calls (#1325)
Browse files Browse the repository at this point in the history
On snapshot we see extra calls to entitlementOptions where `page=undefined`. This does _not_ happen locally for me, which is confusing, but regardless I've added an enabled check to hopefully stop this behaviour

refs ERM-3246 (But is not required for that functionality to work)
  • Loading branch information
EthanFreestone authored May 29, 2024
1 parent 2cfff70 commit 32a32ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/routes/EResourceViewRoute/EResourceViewRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ const EResourceViewRoute = ({
() => {
const params = [...eresourceEntitlementOptionsParams];
return ky.get(`${entitlementOptionsPath}?${params?.join('&')}`).json();
},
{
enabled: !!entitlementOptionsPage && !!entitlementOptionsPageSize
}
);

Expand Down

0 comments on commit 32a32ba

Please sign in to comment.