Skip to content
This repository was archived by the owner on Jan 25, 2020. It is now read-only.
This repository was archived by the owner on Jan 25, 2020. It is now read-only.

_locate *could* validate locale object #6

@grawk

Description

@grawk

https://github.com/krakenjs/file-resolver/blob/master/index.js#L32

If something is wrong with the locale object, for example it is an empty object {} then _locate will pass non-string arguments to path.join resulting in:

TypeError: Arguments to path.join must be strings
   at path.js:360:15
   at Array.filter (native)
   at Object.exports.join (path.js:358:36)
   at Object.proto._locate (/Users/medelman/src/krakex/kraken-examples/with.i18n/node_modules/engine-munger/node_modules/file-resolver/index.js:32:29)

Not sure if this would be considered over-protective of the module or not...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions