mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-27 11:03:23 +03:00
patch language switcher bug
This commit is contained in:
parent
9c04d44159
commit
7a2633a1db
@ -115,6 +115,7 @@ export default class APIDocsGetSlate extends React.Component {
|
||||
language={language}
|
||||
title="Get slate by ID"
|
||||
onLanguageChange={this.props.onLanguageChange}
|
||||
multiLang="true"
|
||||
/>
|
||||
<br />
|
||||
<CodeBlock
|
||||
|
@ -326,7 +326,7 @@ class CodeBlock extends React.Component {
|
||||
this.props.onLanguageChange(language);
|
||||
};
|
||||
render() {
|
||||
let availableLanguages = Object.keys(this.props.children);
|
||||
let availableLanguages = this.props.multiLang ? Object.keys(this.props.children) : 1;
|
||||
let showTopBar = this.props.title || availableLanguages.length > 1;
|
||||
if (this.props.title) {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user