Skip to content

Commit 34ad9e3

Browse files
committed
PB-76: PageBuilder Product List Template Is Missing Product Color & Size Options in Admin
- Disallow swatches to render multiple times within the same element
1 parent fa93def commit 34ad9e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ define([
296296
* @private
297297
*/
298298
_init: function () {
299+
// Don't render the same set of swatches twice
300+
if ($(this.element).attr('data-rendered')) {
301+
return;
302+
}
303+
$(this.element).attr('data-rendered', true);
304+
299305
if (_.isEmpty(this.options.jsonConfig.images)) {
300306
this.options.useAjax = true;
301307
// creates debounced variant of _LoadProductMedia()

0 commit comments

Comments
 (0)