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

Inserting an array of stings throws error #214

Closed
LexAckson opened this issue Jun 4, 2021 · 2 comments
Closed

Inserting an array of stings throws error #214

LexAckson opened this issue Jun 4, 2021 · 2 comments

Comments

@LexAckson
Copy link

Template:
+++INS ['a','b','c'] +++

Output in version 4.6.0:
a,b,c
Output in version 4.6.2:
Command failed! "['a', 'b', 'c']" Result of command '['a', 'b', 'c']' is an object

node v10.16.3, chrome v93

@jjhbw
Copy link
Collaborator

jjhbw commented Jun 5, 2021

I introduced this behaviour in 4.6.1 on purpose to avoid objects as the result of INS commands. This would result in '[object Object]' strings in your report, which are practically always a mistake.

I did not consider your use case well enough, though. I personally would always use [1,2,3].join(', ') instead... However, come to think of it it is pretty reasonable to expect this to just work.

I will make an exception for arrays.

@jjhbw
Copy link
Collaborator

jjhbw commented Jun 5, 2021

@jjhbw jjhbw closed this as completed Jun 5, 2021
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

No branches or pull requests

2 participants