Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function CodeSnippets({ postman, codeSamples }: Props) {
]);
// no dependencies was intentionlly set for this particular hook. it's safe as long as if conditions are set
useEffect(function onSelectedVariantUpdate() {
if (selectedVariant && selectedVariant !== language.variant) {
if (selectedVariant && selectedVariant !== language?.variant) {
const postmanRequest = buildPostmanRequest(postman, {
queryParams,
pathParams,
Expand Down Expand Up @@ -211,6 +211,7 @@ function CodeSnippets({ postman, codeSamples }: Props) {
// eslint-disable-next-line react-hooks/exhaustive-deps
useEffect(function onSelectedSampleUpdate() {
if (
language &&
language.samples &&
language.samplesSources &&
selectedSample &&
Expand Down
Loading