From fb28430a588c486aa5c537b4445cdb6fc7844113 Mon Sep 17 00:00:00 2001 From: Seung Park Date: Tue, 21 Nov 2023 10:31:46 -0500 Subject: [PATCH] safeguard for types --- src/utils/search-facet-constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/search-facet-constants.js b/src/utils/search-facet-constants.js index ecd63786f..227536bd2 100644 --- a/src/utils/search-facet-constants.js +++ b/src/utils/search-facet-constants.js @@ -20,7 +20,7 @@ export const VERSION_GROUP_ID = 'version'; // and remove its parent selection as child facet selection implies parent facet export const SINGLE_SELECT_FIELDS = [VERSION_GROUP_ID]; -export const requestHeaders = process.env['GATSBY_MARIAN_URL'].includes('staging') +export const requestHeaders = process.env['GATSBY_MARIAN_URL']?.includes('staging') ? { credentials: 'include', }