From 9bea1cc583c1654f2ac82af3e28f499d28f8fe5d Mon Sep 17 00:00:00 2001 From: Enzo Mercanti Date: Fri, 22 Nov 2024 13:44:33 -0300 Subject: [PATCH] fix: skip graphql query if parameter is null --- CHANGELOG.md | 2 ++ react/B2BQuotesLink.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63569ef..3890755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Skip graphl query if parameter is null ## [1.6.5] - 2024-09-26 ### Fixed diff --git a/react/B2BQuotesLink.tsx b/react/B2BQuotesLink.tsx index b488fde..450488c 100644 --- a/react/B2BQuotesLink.tsx +++ b/react/B2BQuotesLink.tsx @@ -21,6 +21,7 @@ const B2BQuotesLink: FunctionComponent = ({ render }) => { const { data } = useQuery(CHECK_PERMISSIONS, { variables: { email: userEmail }, + skip: !userEmail, }) useEffect(() => {