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

_locate *could* validate locale object #6

Open
grawk opened this issue Sep 4, 2014 · 1 comment · May be fixed by #8
Open

_locate *could* validate locale object #6

grawk opened this issue Sep 4, 2014 · 1 comment · May be fixed by #8

Comments

@grawk
Copy link
Member

grawk commented Sep 4, 2014

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...

@aredridel
Copy link
Contributor

Yeah, that would make sense to suppress -- that's not a class of error it should be emitting.

aredridel added a commit to aredridel/file-resolver that referenced this issue Sep 15, 2014
@aredridel aredridel linked a pull request Sep 15, 2014 that will close this issue
aredridel added a commit to aredridel/file-resolver that referenced this issue Sep 16, 2014
aredridel added a commit to aredridel/file-resolver that referenced this issue Sep 16, 2014
aredridel added a commit to aredridel/file-resolver that referenced this issue Feb 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants