Skip to content

Commit

Permalink
[docs-theme] fix: resolve stray references to "name" global (#4349)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Sep 29, 2020
1 parent 6e15782 commit 3574bc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class InterfaceTable extends React.PureComponent<IInterfaceTableProps> {
// entry.type looks like "{ [name: string]: (date: Date) => boolean }"
const [signature, returnType] = entry.type.slice(2, -2).split("]: ");
return (
<tr key={name}>
<tr key={entry.name}>
<td className="docs-prop-name">
<code>{renderType(signature)}]</code>
</td>
Expand Down
6 changes: 3 additions & 3 deletions packages/docs-theme/src/components/typescript/methodTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ export class MethodTable extends React.PureComponent<IMethodTableProps> {
if (entry == null) {
return null;
}

const { renderBlock, renderType } = this.context;
const { returnType } = entry;

return (
<tr key={name}>
<tr key={entry.name}>
<td className="docs-prop-name">
<Code className="docs-prop-type">{renderType(returnType)}</Code>
<Code className="docs-prop-type">{renderType(entry.returnType)}</Code>
</td>
<td className="docs-prop-details">
<div className="docs-prop-description">{renderBlock(entry.documentation)}</div>
Expand Down

1 comment on commit 3574bc4

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[docs-theme] fix: resolve stray references to "name" global (#4349)

Previews: documentation | landing | table

Please sign in to comment.