AE 2024 & Beta crash when using:
alert(
[2, 1, 0].sort(function () {
return Math.random() - 0.5
})
)
demo:
(function(thisObj) {
buildUI(thisObj);
function buildUI(thisObj) {
var palette = (thisObj instanceof Panel) ? thisObj : new Window("palette", "BUG", undefined, {
resizeable: true
}
);
var button1 = palette.add("button", undefined, "RUN");
if (palette instanceof Window) {
palette.show();
}
else {
palette.layout.layout(true);
}
button1.onClick = function() {
alert([2, 1, 0].sort(function () {
return Math.random() - 0.5;
}));
};
}
}
)(this);