fix(docs-infra): fix cards not shown if we hit the API page without active API tab (#58883)

since we are only updating the members margin at the constructing phase,
we should not disable this operation if user hit the page with tabs different than API active,
otherwise if user switched to the API page he won't see the cards since members margin equals zero and docs viewer won't be shown

Resolves #58882

PR Close #58883
This commit is contained in:
Hakeem 2024-11-25 09:31:36 -08:00 committed by Jessica Janiuk
parent fbf0c8226e
commit 914f540a43

View file

@ -110,9 +110,7 @@ export default class ApiReferenceDetailsPage {
this.appScroller.disableScrolling = true;
afterNextRender({
write: () => {
if (this.isApiTabActive()) {
this.scrollHandler.updateMembersMarginTop(API_REFERENCE_TAB_BODY_CLASS_NAME);
}
this.scrollHandler.updateMembersMarginTop(API_REFERENCE_TAB_BODY_CLASS_NAME);
},
});
}