Skip to content

if (!module.parent) should be if (module === require.main) #670

@indexzero

Description

@indexzero

FYI.

Isaac Schlueter 4:52
well, the "correct" way to check that would be if (module === require.main)

We've got a related issue in haibu with a workaround coming, but since this is in the default app.js script for express, it seems worthwhile to change if it's not "correct" (for what it's worth).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions