File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/CodeSnippets Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ function CodeSnippets({ postman, codeSamples }: Props) {
180
180
] ) ;
181
181
// no dependencies was intentionlly set for this particular hook. it's safe as long as if conditions are set
182
182
useEffect ( function onSelectedVariantUpdate ( ) {
183
- if ( selectedVariant && selectedVariant !== language . variant ) {
183
+ if ( selectedVariant && selectedVariant !== language ? .variant ) {
184
184
const postmanRequest = buildPostmanRequest ( postman , {
185
185
queryParams,
186
186
pathParams,
@@ -211,6 +211,7 @@ function CodeSnippets({ postman, codeSamples }: Props) {
211
211
// eslint-disable-next-line react-hooks/exhaustive-deps
212
212
useEffect ( function onSelectedSampleUpdate ( ) {
213
213
if (
214
+ language &&
214
215
language . samples &&
215
216
language . samplesSources &&
216
217
selectedSample &&
You can’t perform that action at this time.
0 commit comments