Skip to content

Conversation

@iuliana
Copy link
Contributor

@iuliana iuliana commented Jun 14, 2021

Edit with YAML editor and Graphical editor now work for multiple yaml plan formats.

@ghost
Copy link

ghost commented Jun 14, 2021

Looks ok, however, I would check the following condition:

if(Array.isArray(edit.type.specList) && edit.type.specList.length > 0 && edit.type.specList[0].format === $stateParams.format) {
    yaml = edit.type.specList[0].contents;
}

Array.isArray() verifies if it is not null as well.

@iuliana
Copy link
Contributor Author

iuliana commented Jun 15, 2021

Looks ok, however, I would check the following condition:

if(Array.isArray(edit.type.specList) && edit.type.specList.length > 0 && edit.type.specList[0].format === $stateParams.format) {
    yaml = edit.type.specList[0].contents;
}

Array.isArray() verifies if it is not null as well.

@algairim you're the JavaScript expert. Updated as requested. Cheers!

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks good now.

@iuliana iuliana merged commit d377ed1 into apache:master Jun 15, 2021
@iuliana iuliana deleted the fix/smart-121-part2 branch June 15, 2021 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant