diff --git a/lib/actions/FunctionRun.js b/lib/actions/FunctionRun.js index 4459ca3c2..6ad1714ea 100644 --- a/lib/actions/FunctionRun.js +++ b/lib/actions/FunctionRun.js @@ -119,6 +119,9 @@ module.exports = function(S) { // Missing function if (!this.function) return BbPromise.reject(new SError(`Function ${this.evt.options.name} does not exist in your project.`)); + // load event data if not it not present already + if (this.evt.data.event) return BbPromise.resolve(); + return this._getEventFromStdIn() .then(event => event || S.utils.readFile(this.function.getRootPath('event.json'))) .then(event => this.evt.data.event = event);