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.set adds extra '' when setting the value of a key to an empty string #1151

Closed
Merudo opened this issue Jan 18, 2020 · 1 comment
Closed
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

@Merudo
Copy link
Member

Merudo commented Jan 18, 2020

Describe the bug
When using json.set to set a value to the empty string, the value is instead set to ".

To Reproduce
Steps to reproduce the behavior:

  1. Type [r: json.set("{}", "field", "")] in MapTool 1.5.11 beta 1.
  2. Notice the output value of field is "''" instead of "" : {"field":"''"}
  3. The output in 1.5.10 is correct: {"field":""}

Expected behavior
Setting a field to the empty string doesn't change it to ''.

MapTool Info

  • Version: 1.5.11 beta 1, develop 1/18/2020
  • Install: New

Desktop (please complete the following information):

  • OS: Windows
  • Version: 10
@Phergus Phergus added bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) labels Jan 18, 2020
@Merudo
Copy link
Member Author

Merudo commented Jan 18, 2020

Tested, working as expected now that #1152 was merged.

@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Jan 18, 2020
Phergus added a commit that referenced this issue Jan 21, 2020
@Phergus Phergus closed this as completed 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

3 participants