From 7079cf6d4e8acd35103f07ee1f13a6527925f4ec Mon Sep 17 00:00:00 2001 From: shaman-apprentice Date: Thu, 16 May 2019 20:37:06 +0200 Subject: [PATCH] add test for null pointer in section data key --- src/transformers/test/section.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/transformers/test/section.test.js b/src/transformers/test/section.test.js index dc103e1..3a21133 100644 --- a/src/transformers/test/section.test.js +++ b/src/transformers/test/section.test.js @@ -31,6 +31,10 @@ test('data binding in list with null pointer exception', () => { expectTemplatesInnerHTML('{{#list}}{{x.y}}{{/list}}', data) }) +test('data binding with null pointer exception in key', () => { + expectTemplatesInnerHTML('{{#a.b}}BUH{{/a.b}}', {}) +}) + test('section without end tag', () => { const template = '{{#list}}{{x}}{{/lst}}' const data = { list: [ {x:1}, {x:2} ] }