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

fix: correct progress multi download #938

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

marknguyen1302
Copy link
Contributor

Describe Your Changes

  • correct progress multi download

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Copy link
Contributor

@louis-jan louis-jan left a comment

Choose a reason for hiding this comment

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

LGTM

@marknguyen1302 marknguyen1302 merged commit dca44cd into dev Jul 29, 2024
2 checks passed
@marknguyen1302 marknguyen1302 deleted the fix/correct-progress-multi-download branch July 29, 2024 08:45
@@ -27,8 +27,9 @@ export const downloadProgress = async (cortex: Cortex, downloadId?: string, down

for await (const stream of response) {
if (stream.length) {
const data = stream[0] as any;
if (downloadId && data.id !== downloadId || downloadType && data.type !== downloadType) continue;
const data = (stream.find((data: any) => data.id === downloadId || !downloadId) as DownloadState | undefined);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why bitwise operator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants