fix: memory limit issue for join filter, fix #737

This commit is contained in:
Yang Jun
2024-08-23 21:27:53 +08:00
committed by Jun Yang
parent 292a93b738
commit 2d59cff0a6
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -495,4 +495,10 @@ describe('Issues', function () {
const liquid = new Liquid()
expect(() => liquid.parse({} as any)).not.toThrow()
})
it('Unexpected "RenderError: memory alloc limit exceeded" #737', () => {
const liquid = new Liquid();
const context = { x: ["a", "b"] };
const template = "{{ x | join: 5 }}"
expect(liquid.parseAndRender(template, context)).resolves.toEqual('a5b')
})
})