From 8cc4bf7efa36db297a2418f87f539d4e0975d6fd Mon Sep 17 00:00:00 2001 From: jos Date: Tue, 2 Apr 2019 21:27:50 +0200 Subject: [PATCH] Fix error in transform modal in case of an empty object --- src/js/showTransformModal.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/showTransformModal.js b/src/js/showTransformModal.js index f80d7d3..26cce73 100644 --- a/src/js/showTransformModal.js +++ b/src/js/showTransformModal.js @@ -147,7 +147,10 @@ function showTransformModal (node, container) { }); } else { - elem.querySelector('#selectFieldsPart').style.display = 'none'; + var selectFieldsPart = elem.querySelector('#selectFieldsPart'); + if (selectFieldsPart) { + selectFieldsPart.style.display = 'none'; + } } var selectrFilterField = new Selectr(filterField, { defaultSelected: false, clearable: true, allowDeselect: true, placeholder: 'field...' });