Skip to content

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

@j-oliveras

Description

@j-oliveras

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions