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

Value is sometimes an empty string #513

Open
kaaax0815 opened this issue Nov 20, 2024 · 0 comments
Open

Value is sometimes an empty string #513

kaaax0815 opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kaaax0815
Copy link

kaaax0815 commented Nov 20, 2024

Environment

node v22.11.0
macos 14.7.1
unstorage 1.13.1

Reproduction

https://stackblitz.com/edit/vitejs-vite-vdcacm?file=src%2Findex.ts

Describe the bug

Can't reproduce on stackblitz but on local maschine.
As you can see in the code

if (b.some((v) => v.status === 'fulfilled' && v.value === '')) {
  console.log('Something went wrong');
}

it checks if v.value is an empty string (which should never be the case)

but I still get this log

Sending response
Sending response
Sending response
Sending response
Something went wrong
Sending response
Sending response
Sending response
Something went wrong
Sending response
Sending response
Something went wrong

when opening the tab and holding ⌘ Cmd + R

Additional context

Using a package like async-mutex I was able to workaround this bug

Logs

No response

@kaaax0815 kaaax0815 added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant