Skip to content

Commit

Permalink
Assert null lookup when rendering an unescaped value
Browse files Browse the repository at this point in the history
It was not being asserted anywhere else, and I was suspecting that
PR #552 was chaging current (and correct) behaviour.
  • Loading branch information
dasilvacontin committed Mar 15, 2016
1 parent 1a00877 commit bcb89cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/_files/null_lookup_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"favorites": {
"color": "orange",
"president": undefined,
"show": null
"show": null,
"symbol": null
}
}
})
1 change: 1 addition & 0 deletions test/_files/null_lookup_object.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
{{name}}'s favorite color: {{#favorites.color}}{{.}}{{/favorites.color}}{{^favorites.color}}no one{{/favorites.color}}.
{{name}}'s favorite president: {{#favorites.president}}{{.}}{{/favorites.president}}{{^favorites.president}}no one{{/favorites.president}}.
{{name}}'s favorite show: {{#favorites.show}}{{.}}{{/favorites.show}}{{^favorites.show}}none{{/favorites.show}}.
{{name}}'s favorite symbol: {{&favorites.symbol}}.
{{/mascot}}
1 change: 1 addition & 0 deletions test/_files/null_lookup_object.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Chris's twitter: unknown.
Squid's favorite color: orange.
Squid's favorite president: no one.
Squid's favorite show: none.
Squid's favorite symbol: .

0 comments on commit bcb89cc

Please sign in to comment.