Set default label ''
[MAILPOET-2592]
This commit is contained in:
committed by
Rostislav Wolný
parent
03e8dd860c
commit
34203b3d69
@@ -82,7 +82,7 @@ export default (data, customFields = []) => {
|
|||||||
mapped.attributes.labelWithinInput = !!item.params.label_within;
|
mapped.attributes.labelWithinInput = !!item.params.label_within;
|
||||||
}
|
}
|
||||||
if (item.params) {
|
if (item.params) {
|
||||||
mapped.attributes.label = item.params.label ? item.params.label : null;
|
mapped.attributes.label = item.params.label ? item.params.label : '';
|
||||||
}
|
}
|
||||||
switch (item.id) {
|
switch (item.id) {
|
||||||
case 'email':
|
case 'email':
|
||||||
|
@@ -224,7 +224,7 @@ describe('Form Body To Blocks', () => {
|
|||||||
delete input.params.label;
|
delete input.params.label;
|
||||||
const [block] = formBodyToBlocks([{ ...emailInput, position: '1' }]);
|
const [block] = formBodyToBlocks([{ ...emailInput, position: '1' }]);
|
||||||
checkBlockBasics(block);
|
checkBlockBasics(block);
|
||||||
expect(block.attributes.label).to.be.equal(null);
|
expect(block.attributes.label).to.be.equal('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should map first name input to block', () => {
|
it('Should map first name input to block', () => {
|
||||||
|
Reference in New Issue
Block a user