Fix more react warnings
Summary: Fixing random React errors as I encountered them. Reviewed By: jknoxville Differential Revision: D18397950 fbshipit-source-id: cb73fcd6cd9aac2cd53c982e5a58760be12a10ca
This commit is contained in:
committed by
Facebook Github Bot
parent
19937c4b83
commit
93655d39b8
@@ -93,14 +93,17 @@ export default class Popover extends PureComponent<Props> {
|
||||
};
|
||||
|
||||
render() {
|
||||
return [
|
||||
<Anchor src="./anchor.svg" key="anchor" />,
|
||||
<PopoverContainer
|
||||
innerRef={this._setRef}
|
||||
key="popup"
|
||||
opts={this.props.forceOpts || {}}>
|
||||
{this.props.children}
|
||||
</PopoverContainer>,
|
||||
];
|
||||
return (
|
||||
<>
|
||||
<Anchor src="./anchor.svg" key="anchor" />
|
||||
<PopoverContainer
|
||||
innerRef={this._setRef}
|
||||
key="popup"
|
||||
opts={this.props.forceOpts || {}}>
|
||||
{this.props.children}
|
||||
</PopoverContainer>
|
||||
,
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,6 @@ class PartialHighlight extends PureComponent<{
|
||||
|
||||
render() {
|
||||
const {highlighted, content, selected} = this.props;
|
||||
let renderedValue;
|
||||
if (
|
||||
content &&
|
||||
highlighted != null &&
|
||||
@@ -148,19 +147,18 @@ class PartialHighlight extends PureComponent<{
|
||||
const before = content.substring(0, highlightStart);
|
||||
const match = content.substring(highlightStart, highlightEnd);
|
||||
const after = content.substring(highlightEnd);
|
||||
renderedValue = [
|
||||
return (
|
||||
<span>
|
||||
{before}
|
||||
<PartialHighlight.HighlightedText selected={selected}>
|
||||
{match}
|
||||
</PartialHighlight.HighlightedText>
|
||||
{after}
|
||||
</span>,
|
||||
];
|
||||
</span>
|
||||
);
|
||||
} else {
|
||||
renderedValue = <span>{content}</span>;
|
||||
return <span>{content}</span>;
|
||||
}
|
||||
return renderedValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user