Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/libs/GetStyledTextArray.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Str from 'expensify-common/lib/str';

/**
* Render a suggestion menu item component.
* @param {String} name
Expand All @@ -6,7 +8,7 @@
*/
const getStyledTextArray = (name, prefix) => {
const texts = [];
const prefixLocation = name.search(prefix);
const prefixLocation = name.search(Str.escapeForRegExp(prefix));

if (prefixLocation === 0 && prefix.length === name.length) {
texts.push({text: prefix, isColored: true});
Expand Down
4 changes: 2 additions & 2 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,12 @@ function canShowReportRecipientLocalTime(personalDetails, report) {
const reportRecipient = personalDetails[participantsWithoutExpensifyEmails[0]];
const reportRecipientTimezone = lodashGet(reportRecipient, 'timezone', CONST.DEFAULT_TIME_ZONE);
const isReportParticipantValidated = lodashGet(reportRecipient, 'validated', false);
return !hasMultipleParticipants
return Boolean(!hasMultipleParticipants
&& !isChatRoom(report)
&& reportRecipient
&& reportRecipientTimezone
&& reportRecipientTimezone.selected
&& isReportParticipantValidated;
&& isReportParticipantValidated);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ class ReportActionCompose extends React.Component {
}
this.setState({composerHeight});
}}
onScroll={this.setShouldShowSuggestionMenuToFalse}
onScroll={() => this.setShouldShowSuggestionMenuToFalse()}
/>
</DragAndDrop>
</View>
Expand Down