Skip to content

Commit 38f6a71

Browse files
fix problems...
1 parent 71d6e94 commit 38f6a71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/SLDSLookup/Menu/Item/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class Item extends React.Component {
2525
}
2626

2727
boldSearchText(children) {
28-
regex = this.props.boldRegex
28+
let regex = this.props.boldRegex
2929
if (!regex) {
3030
const term = this.props.searchTerm;
3131
if(!children || !term) return children;
32-
const regex = new RegExp('(' + escapeRegExp(term) + ')', 'gi');
32+
regex = new RegExp('(' + escapeRegExp(term) + ')', 'gi');
3333
}
3434
return React.Children.map(children, c => {
3535
return (typeof c === 'string') ? <span dangerouslySetInnerHTML={{ __html: c.replace(regex, '<mark>$1</mark>')}}></span> : c;
@@ -88,7 +88,7 @@ Item.propTypes = {
8888
handleItemFocus: React.PropTypes.func,
8989
onSelect: React.PropTypes.func,
9090
data: React.PropTypes.object,
91-
boldRegex: react.PropTypes.instanceOf(RegExp)
91+
boldRegex: React.PropTypes.instanceOf(RegExp)
9292
};
9393

9494
Item.defaultProps = {

0 commit comments

Comments
 (0)