From 45e0fb21dc5587d790071aa8e2b552ccde0b5e86 Mon Sep 17 00:00:00 2001 From: ChenL Date: Thu, 16 Mar 2017 19:02:30 +0800 Subject: [PATCH] Fixed array arguments bug --- test/filters.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/filters.js b/test/filters.js index 4568c9419..06b25a3f5 100644 --- a/test/filters.js +++ b/test/filters.js @@ -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')); }); });