Skip to content

Commit 3af57df

Browse files
author
Erin Spiceland
committed
Wrap evalString with parens.
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.
1 parent d4d091d commit 3af57df

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

js/comparison_table.js

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)