fix: handle invalid Algolia keys gracefully in dev (#37088)
Invalid keys throw an error in production, but just cause invalid PropTypes and build warnings in development.
This commit is contained in:
committed by
mrugesh
parent
4889e0fdc6
commit
e72855dad3
@ -30,6 +30,12 @@ const locations = {
|
||||
module.exports = Object.assign(locations, {
|
||||
locale,
|
||||
stripePublicKey,
|
||||
algoliaAppId,
|
||||
algoliaAPIKey
|
||||
algoliaAppId:
|
||||
!algoliaAppId || algoliaAppId === 'Algolia app id from dashboard'
|
||||
? null
|
||||
: algoliaAppId,
|
||||
algoliaAPIKey:
|
||||
!algoliaAPIKey || algoliaAPIKey === 'Algolia api key from dashboard'
|
||||
? null
|
||||
: algoliaAPIKey
|
||||
});
|
||||
|
Reference in New Issue
Block a user