Skip to content

[BUG] Does not handle undefined return value from signal-exit's onExit() function #84

Open
@kayahr

Description

@kayahr

According to the documentation of signal-exit the onExit function always returns a function. But according to the actual source code this is not true. The function can return undefined in specific circumstances (I encounter this within Electron) and write-file-atomic fails when trying to call this undefined function.

I guess the function call should be wrapped with a null check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions