Skip to content

Conversation

@sindurigf
Copy link
Contributor

No description provided.

* @return {Response} The response.
*/
visitNodeEditPage: async ([page, node_title], langcode = '') => {
visitNodeEditPage: async ([page, node_title, langcode = '']) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Testing @sindurigf 's change made me realize that I don't know Javascript (well I knew that part) and that it is fine to have an optional part of an array, inside an array parameter.

In other words, this change is possible and does not change anything - and that means the recent addition that I did of langcode outside of the array is unnecessary... and inconsistent.

So I 'fixed' that in this same PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

None of the current visitNodeEditPage() calls pass the optional langcode, so nothing breaks. (This was added for LDP-1787 which isn't merged yet.)

* @aliases nc
*/
public function cloneNodeByTitle($node_type, $node_title, $new_node_title) {
public function cloneNodeByTitle($node_type, $node_title, $new_node_title, $moderation_state) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add a default value for moderation state here as well, even though we have it in the helper. Not a biggie

Copy link
Contributor

Choose a reason for hiding this comment

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

done

@petarbasic petarbasic merged commit 563fdc0 into 1.x Jan 23, 2024
@petarbasic petarbasic deleted the feature/LDP-2328 branch January 23, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants