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

Crashed on open if options parameter is null or undefined #20

Open
j-oliveras opened this issue Feb 23, 2021 · 0 comments
Open

Crashed on open if options parameter is null or undefined #20

j-oliveras opened this issue Feb 23, 2021 · 0 comments
Labels

Comments

@j-oliveras
Copy link

https://github.com/fivdi/spi-device/blob/master/spi-device.d.ts#L44
declares that options parameter can be null or undefined but node crashes using these values:
With null:

var spi = require("spi-device");
var d = spi.open(0, 0, null, err => console.log(err));
// FATAL ERROR: v8::Object::Cast Could not convert to object

With undefined:

var spi = require("spi-device");
var d = spi.open(0, 0, undefined, err => console.log(err));
// FATAL ERROR: v8::Object::Cast Could not convert to object
@fivdi fivdi added the bug label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants