Permalink
Browse files

🐛 Catch null results correctly. Fixes 855 (#856)

This commit fixes small coding problem when results from a method are not checked
for possible null. The fix is to just safely provide empty string

Thanks!
  • Loading branch information...
1 parent 20b75f3 commit b16a95762b58a4a7df256f87d2d8f8bf50cd01c2 @peterblazejewicz peterblazejewicz committed on GitHub Dec 6, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 configuration.js
View
@@ -32,7 +32,7 @@ module.exports = {
var baseNamespace = getBaseNamespace(fs);
var cwd = process.cwd();
- var baseDirectory = path.resolve(path.dirname(this.getProjectJsonPath()));
+ var baseDirectory = path.resolve(path.dirname(this.getProjectJsonPath() || ''));
var relativePath = path.relative(baseDirectory, cwd);
if (relativePath) {
return [baseNamespace].concat(relativePath.split(path.sep)).join('.');

0 comments on commit b16a957

Please sign in to comment.