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

opts is not an object #130

Open
lastmjs opened this issue Jan 25, 2024 · 1 comment
Open

opts is not an object #130

lastmjs opened this issue Jan 25, 2024 · 1 comment

Comments

@lastmjs
Copy link

lastmjs commented Jan 25, 2024

Here opts is assumed to be an object, but in one of our code paths it was a string like utf-8: https://github.com/second-state/wasmedge-quickjs/blob/main/modules/internal/fs/stream.js#L202

I've added this code to fix it temporarily: opts = typeof opts !== 'object' ? {} : opts;

@L-jasmine
Copy link
Collaborator

I'm not very familiar with JavaScript, so if there are bugs like this in JavaScript, feel free to submit a pull request to help us optimize it.

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

No branches or pull requests

2 participants