Skip to content

fix: #287 don't include Tags property if no tags provided #288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 24, 2019
Merged

Conversation

maafk
Copy link
Contributor

@maafk maafk commented Dec 23, 2019

Global tags become optional for inheriting

fixes #287

Global tags become optional for inheriting
@@ -99,7 +99,12 @@ module.exports = {
let RoleArn;
let DependsOn = [];
let LoggingConfiguration;
const Tags = toTags(this.serverless.service.provider.tags);
let Tags;
if (typeof stateMachineObj.inheritGlobalTags !== 'undefined' && stateMachineObj.inheritGlobalTags === false) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would stateMachineObj.inheritGlobalTags === false have sufficed without the explicit undefined check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly?

I'm not as familiar with nodejs, but was trying to avoid a Key error if inheritGlobalTags isn't included for the state machine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, I see, in this case you'll be fine, stateMachineObj.inheritGlobalTags === false would not match if inheritGlobalTags is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @theburningmonk. Just pushed the update

@theburningmonk theburningmonk merged commit 2753413 into serverless-operations:master Dec 24, 2019
@theburningmonk
Copy link
Collaborator

🎉 This PR is included in version 2.14.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

ss-betseqnzr pushed a commit to BetSEQNZR/serverless-step-functions that referenced this pull request Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blank tags property erroring in certain AWS regions
2 participants