Fixed array arguments bug

This commit is contained in:
ChenL
2017-03-16 19:02:30 +08:00
parent 4fc977268f
commit 45e0fb21dc
+3 -1
View File
@@ -329,7 +329,9 @@ describe('filters', function() {
});
describe('obj_test', function() {
liquid.registerFilter('obj_test', (...v) => v.join(','));
liquid.registerFilter('obj_test', function() {
return Array.prototype.slice.call(arguments).join(',');
});
it('should support object', () => test('{{ "a" | obj_test: k1: "v1", k2: "v2" }}', 'a,k1,v1,k2,v2'));
});
});