Refactor style settings selectors determination for hiding

This commit is contained in:
Alex P 2023-11-23 16:42:40 +02:00
parent 3131dab353
commit f338ef57df
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -317,6 +317,7 @@ document.addEventListener(
'#field-button' + locationPrefix + '_label',
'#field-button' + locationPrefix + '_color',
'#field-button' + locationPrefix + '_shape',
'#field-button' + locationPrefix + '_height',
'#field-button' + locationPrefix + '_preview',
]
@ -324,11 +325,7 @@ document.addEventListener(
inputSelectors.push('#field-button_' + location + '_heading');
}
if (location === 'mini-cart') {
inputSelectors.push('#field-button' + locationPrefix + '_height');
}
return inputSelectors
return inputSelectors.filter(selector => document.querySelector(selector));
}
const allPayLaterMessaginginputSelectors = () => {