Skip to content

Device Missing #1

Description

@markwallsgrove

usb.findByIds will return undefined if the device is not plugged in. The second line in the snippet below causes a error to be thrown TypeError: Cannot read property 'open' of undefined.

    device = usb.findByIds(this.vid, this.pid);
    device.open();

Would it be possible it either return a error to the callback or throw a exception? If you could state your preference I don't mind raising a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions