Update expression resolver to return null instead of blank string.#296
Conversation
|
I could not find a reason why we return empty string here. We used to return |
jboulter
left a comment
There was a problem hiding this comment.
When was it updated? The only the reason I can think of is that if you're echoing the result back out, we'd rather return an empty string to the page rather than "null".
Codecov Report
@@ Coverage Diff @@
## master #296 +/- ##
============================================
+ Coverage 71.96% 71.98% +0.02%
- Complexity 1525 1526 +1
============================================
Files 237 237
Lines 4769 4769
Branches 757 757
============================================
+ Hits 3432 3433 +1
Misses 1071 1071
+ Partials 266 265 -1
Continue to review full report at Codecov.
|
|
Here: 1d694cd. The expression resolver is only used in tags: |
It doesn't make sense to return an empty string from the expression resolver if the expression cannot be evaluated due to an exception. Some built-in tags will treat
""differently from null. For exampleforwill treat""as[""]whereas it should be treated as[].