Skip to content

Commit

Permalink
Fixed eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zfurtak committed Sep 20, 2024
1 parent c5a6703 commit 3f8676a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/libs/NextStepUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function parseMessage(messages: Message[] | undefined) {
let tagType = part.type ?? 'span';
let content = Str.safeEscape(part.text);

const previousPart = messages[index - 1];
const nextPart = messages[index + 1];
const previousPart = messages.at(index - 1);
const nextPart = messages.at(index + 1);

if (currentUserEmail === part.text || part.clickToCopyText === currentUserEmail) {
tagType = 'strong';
Expand Down Expand Up @@ -73,7 +73,7 @@ function getNextApproverDisplayName(policy: Policy, ownerAccountID: number, subm
return ReportUtils.getDisplayNameForParticipant(submitToAccountID);
}

const nextApproverEmail = approvalChain.length === 1 ? approvalChain.at(0) : approvalChain[approvalChain.indexOf(currentUserEmail) + 1];
const nextApproverEmail = approvalChain.length === 1 ? approvalChain.at(0) : approvalChain.at(approvalChain.indexOf(currentUserEmail) + 1);
if (!nextApproverEmail) {
return ReportUtils.getDisplayNameForParticipant(submitToAccountID);
}
Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/Policy/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ function clearPolicyTagListErrors(policyID: string, tagListIndex: number) {

function renamePolicyTag(policyID: string, policyTag: {oldName: string; newName: string}, tagListIndex: number) {
const policy = PolicyUtils.getPolicy(policyID);
const tagList = PolicyUtils.getTagLists(allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`] ?? {})?.[tagListIndex] ?? {};
const tag = tagList.tags?.[policyTag.oldName];
const tagList = PolicyUtils.getTagLists(allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`] ?? {})?.at(tagListIndex);
const tag = tagList?.tags?.[policyTag.oldName];
const oldTagName = policyTag.oldName;
const newTagName = PolicyUtils.escapeTagName(policyTag.newName);

Expand Down

0 comments on commit 3f8676a

Please sign in to comment.