Click the button in the dialog to make it remove itself.
Dialog.RemoveButton(..) now throws the following error:
Fit.UI.js:1216 Uncaught Error: Collection was modified while iterating objects
at Object.Fit.Validation.ThrowError (Fit.UI.js:1216)
at Object.Fit.Array.ForEach (Fit.UI.js:1419)
at Fit.Controls.Dialog.RemoveButton (Fit.UI.js:14987)
at ?editor_console=:120
at Fit.UI.js:11317
at Object.Fit.Array.ForEach (Fit.UI.js:1416)
at Fit.Controls.Button.Click (Fit.UI.js:11315)
at HTMLDivElement.<anonymous> (Fit.UI.js:11093)
The following fiddle demonstrates the problem: https://jsfiddle.net/30c8jLk7/3/
Click the button in the dialog to make it remove itself. Dialog.RemoveButton(..) now throws the following error: