Skip to content

Wrap evalString with parens. - #5

Merged
dorey merged 1 commit into
dorey:masterfrom
erinishimoticha:master
Mar 27, 2014
Merged

dorey merged 1 commit into
dorey:masterfrom
erinishimoticha:master

Conversation

@erinishimoticha

Copy link
Copy Markdown
Contributor

Prior to this commit, we checked to see if asString was equal to '{}'
because a syntax error would occur during eval on these comparisons. If
we were comparing '{}', we'd wrap it in an array and access index 0 to
get the result of the comparison after eval. Because this requirement is
conditional, we had to modify evalString itself. This had the side
effect of making the 'title' attribute contain the array representation
as well, which is ugly. Instead, we can wrap every eval'ed string in
parens. This does not change the return value but does mitigate the
syntax error, and it does it in a way that does not change the title
displayed in the table.

Prior to this commit, we checked to see if asString was equal to '{}'
because a syntax error would occur during eval on these comparisons. If
we were comparing '{}', we'd wrap it in an array and access index 0 to
get the result of the comparison after eval. Because this requirement is
conditional, we had to modify evalString itself. This had the side
effect of making the 'title' attribute contain the array representation
as well, which is ugly.  Instead, we can wrap every eval'ed string in
parens. This does not change the return value but does mitigate the
syntax error, and it does it in a way that does not change the title
displayed in the table.
@dorey

dorey commented Mar 27, 2014

Copy link
Copy Markdown
Owner

Parentheses! well that's definitely a cleaner way to do it.... Thanks

dorey added a commit that referenced this pull request Mar 27, 2014
Wrap evalString with parens.
@dorey
dorey merged commit bb13d89 into dorey:master Mar 27, 2014
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

⌂ Proxy