Skip to content

Fix missing parentheses in toString method call in withOperator#130

Closed
Nepomuk5665 wants to merge 1 commit intouber:masterfrom
Nepomuk5665:fix-withoperator-tostring-call
Closed

Fix missing parentheses in toString method call in withOperator#130
Nepomuk5665 wants to merge 1 commit intouber:masterfrom
Nepomuk5665:fix-withoperator-tostring-call

Conversation

@Nepomuk5665
Copy link
Copy Markdown
Contributor

Summary

Fix a bug in Condition.withOperator() where types.toString was used instead of types.toString(), causing the error message to display [Function: toString] instead of the actual valid operators and,or.

Problem

When an invalid operator is passed to withOperator(), the error message shows:

Error: Operator must be one of [[Function: toString]]

Instead of the intended:

Error: Operator must be one of [and,or]

Fix

Add the missing parentheses to properly call the toString() method on the array.

This is the same type of bug that was fixed in commit 52c27bd for withEvaluator.

@albertyw
Copy link
Copy Markdown
Member

Duplicate of #129

@albertyw albertyw marked this as a duplicate of #129 Jan 28, 2026
@albertyw albertyw closed this Jan 28, 2026
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.

2 participants