Skip to content
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

json.isEmpty() throws Invalid condition if passed a string. #1167

Closed
Phergus opened this issue Jan 22, 2020 · 1 comment
Closed

json.isEmpty() throws Invalid condition if passed a string. #1167

Phergus opened this issue Jan 22, 2020 · 1 comment
Assignees
Labels
bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) tested This issue has been QA tested by someone other than the developer.

Comments

@Phergus
Copy link
Contributor

Phergus commented Jan 22, 2020

Describe the bug
If json.isEmpty() is passed a string, it produces an error:

Invalid condition in IF(json.isEmpty(group)) roll option.
      Statement options (if any): r, if(json.isEmpty(group)) 
      Statement Body : 1;0

To Reproduce
Steps to reproduce the behavior:

  1. Run the following:
    [H: group = "a"][r, if(json.isEmpty(group)): 1;0]
  2. Error is thrown.

Works correctly if an empty string "" or a space " " is passed.

Similar to issue seen in #1144

MapTool Info

  • Version: 1.6 alpha 4 and current dev code
@Phergus Phergus added bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) labels Jan 22, 2020
@cwisniew cwisniew self-assigned this Jan 22, 2020
@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Jan 22, 2020
@Phergus
Copy link
Contributor Author

Phergus commented Jan 22, 2020

Tested. Working as expected.

@Phergus Phergus closed this as completed Jan 23, 2020
Phergus added a commit that referenced this issue Jan 23, 2020
Merudo added a commit to Merudo/maptool that referenced this issue Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

No branches or pull requests

2 participants