File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
app/code/Magento/Swatches/Model/Plugin Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ protected function setProperOptionsArray(Attribute $attribute)
157157 * Prepare attribute for conversion from any swatch type to dropdown
158158 *
159159 * @param Attribute $attribute
160+ * @throws \Magento\Framework\Exception\LocalizedException
160161 * @return void
161162 */
162163 protected function convertSwatchToDropdown (Attribute $ attribute )
@@ -166,9 +167,7 @@ protected function convertSwatchToDropdown(Attribute $attribute)
166167 if (!empty ($ additionalData )) {
167168 $ additionalData = $ this ->serializer ->unserialize ($ additionalData );
168169 if (is_array ($ additionalData ) && isset ($ additionalData [Swatch::SWATCH_INPUT_TYPE_KEY ])) {
169- if ($ additionalData [Swatch::SWATCH_INPUT_TYPE_KEY ] == Swatch::SWATCH_INPUT_TYPE_VISUAL ) {
170- $ this ->cleanEavAttributeOptionSwatchValues ($ attribute ->getOption ());
171- }
170+ $ this ->cleanEavAttributeOptionSwatchValues ($ attribute ->getOption ());
172171 unset($ additionalData [Swatch::SWATCH_INPUT_TYPE_KEY ]);
173172 $ attribute ->setData ('additional_data ' , $ this ->serializer ->serialize ($ additionalData ));
174173 }
You can’t perform that action at this time.
0 commit comments