Skip to content

Commit

Permalink
Fixed issue with incorrect handler path being detected (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
dapriett authored and jogold committed May 16, 2017
1 parent 9c38f06 commit 083ec68
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ const list = require('./list');

const handlerProp = R.prop('handler');

const handlerExport = R.compose(R.last, R.split('.'));

const handlerPath = handler => R.replace(handlerExport(handler), 'js', handler);
const handlerPath = R.replace(/\.[^.]+$/, '.js');
const handlerFile = R.compose(path.basename, handlerPath);
const fnPath = R.compose(handlerPath, handlerProp);
const fnFilename = R.compose(handlerFile, handlerProp);
Expand Down

0 comments on commit 083ec68

Please sign in to comment.