Prerequisites
Description
Note: The issue is related to editor JS (i.e. only happens during JS render)
The problem occurs when one of the repeater controls is changed/added/removed and then a user goes to History and clicks on a previous action (i.e. undo / Ctrl+Z, but manually).
When this is done, Elementor re-processes the CSS style for that element (because of element onRender -> renderUI -> renderStyles -> getStyleControls).
In the getStyleControls function, it is assumed that the control is a normal control and there's no check if it's a repeater.
So, when it comes to Line 128 (in that function) to process that control's CSS, it throws an error because it gets a repeater object instead of the expected Backbone Collection.
For normal repeater widgets with no CSS selector child controls, this is fine, but for the repeaters which have controls with CSS Selectors, it does not revert back to the previous state CSS (because of this error) and it messes up the Element's CSS output in Editor.
Steps to reproduce
(Keep the Browser Console open)
- Add any repeater Widget (for eg: Icon List).
- Change any repeater control setting / add / delete a repeater item.
- Go to History (from bottom navigation bar, option besides responsive mode icon), and go 1 action back (so that the action is the previous state of the repeater).
- The error
Uncaught TypeError: n.attributes[e.name].each is not a function will appear in console.

Isolating the problem
Prerequisites
Description
Note: The issue is related to editor JS (i.e. only happens during JS render)
The problem occurs when one of the repeater controls is changed/added/removed and then a user goes to History and clicks on a previous action (i.e. undo / Ctrl+Z, but manually).
When this is done, Elementor re-processes the CSS style for that element (because of element
onRender->renderUI->renderStyles->getStyleControls).In the getStyleControls function, it is assumed that the control is a normal control and there's no check if it's a repeater.
So, when it comes to Line 128 (in that function) to process that control's CSS, it throws an error because it gets a repeater object instead of the expected Backbone Collection.
For normal repeater widgets with no CSS selector child controls, this is fine, but for the repeaters which have controls with CSS Selectors, it does not revert back to the previous state CSS (because of this error) and it messes up the Element's CSS output in Editor.
Steps to reproduce
(Keep the Browser Console open)
Uncaught TypeError: n.attributes[e.name].each is not a functionwill appear in console.Isolating the problem