This is an automated email from the ASF dual-hosted git repository. bdelacretaz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
commit 9f00339937811e792cfbba3a493974266b183dc0 Author: Bertrand Delacretaz <[email protected]> AuthorDate: Fri Jul 26 12:26:48 2019 +0200 Fix 'action not found' case --- serverless-microsling/lib/openwhisk-renderer.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/serverless-microsling/lib/openwhisk-renderer.js b/serverless-microsling/lib/openwhisk-renderer.js index a323f94..5ac5259 100644 --- a/serverless-microsling/lib/openwhisk-renderer.js +++ b/serverless-microsling/lib/openwhisk-renderer.js @@ -33,10 +33,14 @@ const getActionInfo = async (resourceType, extension) => { const act = actions.find(act => { return resourceType == getAnnotation(act, 'sling:resourceType') && extension == getAnnotation(act, 'sling:extensions') }) - resolve({ - action: act, - contentType: getAnnotation(act, 'sling:contentType'), - }); + let result; + if(act) { + result = { + action: act, + contentType: getAnnotation(act, 'sling:contentType'), + }; + } + resolve(result); }) .catch(e => { throw e;
