Skip to content

Commit

Permalink
Fix syntax error when action was not found (config was undefined)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Mar 8, 2018
1 parent 1365047 commit 54890b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports.api = function(args, opts) {
var action = args[0];
var config = utils.config(opts.env);

var actionObj = exports.load(action);
var actionObj = exports.load(config, action);

if(!actionObj) {
return;
Expand All @@ -29,7 +29,7 @@ exports.api = function(args, opts) {
actionObj.run(config, info);
};

exports.load = function(action) {
exports.load = function(config, action) {
if(!action) action = 'start';

var file = path.join(__dirname, 'lib', `${action}.js`);
Expand Down

0 comments on commit 54890b9

Please sign in to comment.