Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update processTrackUtils.ts #994

Merged
merged 1 commit into from
Jul 1, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function getProcessDetails(id: any, getNew: any = false): Promise<any> {
}
else return {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unnecessary else clause.

The else clause can be omitted because the previous branch breaks early.

-        else return {};
+        return {};
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
else return {};
return {};
Tools
Biome

[error] 23-23: This else clause can be omitted because previous branches break early.

Unsafe fix: Omit the else clause.

(lint/style/noUselessElse)

}
else {
else if (queryResponse.rows.length > 0) {
const result = queryResponse.rows[0];
result.campaignId = result.campaignid;
delete result.campaignid;
Expand All @@ -34,6 +34,7 @@ async function getProcessDetails(id: any, getNew: any = false): Promise<any> {
delete result.lastmodifiedtime;
return result;
}
return {};
}

async function persistTrack(
Expand Down
Loading