Skip to content

Buffer type check has scoping issues #15

@palant

Description

@palant

I tried using this module and hit the "expected Uint8Array" exception. Problem seems to be that the caller is running in a sandbox (via vm module), so its Uint8Array class is coming from a different scope. It might be better to test for buf.BYTES_PER_ELEMENT == 1.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions