render undefined to ''

This commit is contained in:
harttle
2016-06-26 12:52:37 +08:00
parent a0feabce5b
commit a482b4abe5
4 changed files with 7 additions and 6 deletions
+3
View File
@@ -32,6 +32,9 @@ describe('liquid', function() {
it('should output array', function() {
engine.parseAndRender('{{arr}}', ctx).should.equal('[-2,"a"]');
});
it('should output undefined to empty', function() {
engine.parseAndRender('foo{{zzz}}bar', ctx).should.equal('foobar');
});
it('should parse html', function() {
(function() {
engine.parse('{{obj}}');