Skip to content

Conversation

jesuisYves
Copy link

The current implementation throws an error if config doesn't have the key or the path is wrong:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received an instance of Object

The reason is that an empty object passed from fp.path is regarded as a truthy value and readFile is called, while expected to be silently ommited.

Added isJust check to handle empty object cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant