Skip to content

Conversation

@Marianne380
Copy link
Contributor

All in the title.

@Marianne380 Marianne380 self-assigned this Dec 26, 2025
Marianne380 and others added 3 commits December 30, 2025 11:43
Co-authored-by: Hugo Drelon <69580439+Hug0-Drelon@users.noreply.github.com>
Co-authored-by: Hugo Drelon <69580439+Hug0-Drelon@users.noreply.github.com>
Allows calling createTerm() without arguments,
generating names like "Term 1", "Term 2", etc.
Comment on lines +64 to +66
if ( ! defaultArgs.name ) {
defaultArgs.name = `Term ${ ++termCounter }`;
}
Copy link
Member

Choose a reason for hiding this comment

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

You can add it directly in defaultArgs definition, right before the spread operator. Am I right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not if we want to increment the counter only when needed. Putting it in defaultArgs would increment the counter even when args.name is provided, wasting numbers.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I see, my bad.

@Hug0-Drelon Hug0-Drelon merged commit 9f45c76 into master Dec 30, 2025
2 checks passed
@Hug0-Drelon Hug0-Drelon deleted the add-create-term branch December 30, 2025 12:45
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.

3 participants