Skip to content

Commit

Permalink
fix for Cannot read property 'Function' of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacobsson committed May 28, 2021
1 parent 5eebc2f commit 9587de1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/share/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ async function run(cmd) {
}
const props = sharedTemplate.Resources[resource].Properties;
if (
sharedTemplate.Resources[resource].Type === "AWS::Serverless::Function" &&
runtimes.filter(p=>p.name === (props.Runtime || template.Globals.Function.Runtime))[0]
.sharable &&
sharedTemplate.Resources[resource].Type === "AWS::Serverless::Function"
.sharable
) {
const shareCode = await inputUtil.prompt(
`Share function code? (${resource})`
Expand Down

0 comments on commit 9587de1

Please sign in to comment.